Issue using plugin via WP-CLI & Cron
-
Hello,
I was having issues with the automatic optimisation settings (web server would occasionally lock up during image upload)
So my webhost advised that they can set up WP-CLI and a cron job to run EWWW however the hosts have came back to me advising of a problem with your plugin, he made some changes to your code but this was lost during plugin upgrade, can you please review and action the change he has made? the message from my web host is below:
Fatal error: Call to a member function get_col() on a non-object in /home/{directory}/public_html/wp-content/plugins/ewww-image-optimizer/iocli.php on line 192
“It looks like it’s an issue with this line in the script:
else {
// load up all the image attachments we can find
$attachments = $wpdb->get_col( “SELECT ID FROM $wpdb->posts WHERE (post_type = ‘attachment’ OR post_type = ‘ims_image’) AND post_mime_type LIKE ‘%%image%%'” );
}And it’s because $wpdb isn’t being instantiated in that function. I’ve added that to the function on line 183 now, but it might be something the developer isn’t aware of perhaps.”
- The topic ‘Issue using plugin via WP-CLI & Cron’ is closed to new replies.