Using NULL $wp_query objects forced me to uninstall
-
Today I had to uninstall this plugin because it was causing fatal errors. I upgraded to 2.4.8 today and immediately saw the following errors:
[14-Apr-2015 09:51:45 UTC] PHP Warning: Creating default object from empty value in /var/sites/c/cheeseweb.eu/public_html/wp-content/plugins/organize-series/orgSeries-setup.php on line 330
[14-Apr-2015 09:51:45 UTC] PHP Fatal error: Call to undefined method stdClass::is_search() in /var/sites/c/cheeseweb.eu/public_html/wp-includes/query.php on line 584It seems the $wp_query variable is NULL but I don’t know why. I changed the function seriestoc_parsequery() to use the query variable passed in as an argument (rather than the global variable). That fixed the initial problem, but then I got the following:
[14-Apr-2015 09:53:57 UTC] PHP Fatal error: Call to a member function get() on a non-object in /var/sites/c/cheeseweb.eu/public_html/wp-includes/query.php on line 28
This is a query var lookup from ‘is_series()’ looking for the variable SERIES_QUERYVAR. But again the $wp_query object is null, so I get the fatal error.
I have tried downgrading to 2.4.7 but the errors persisted. I uninstalled and downloaded a new version, same issue.
Not sure where to go from here.
Running WordPress 4.1.1 and the website is https://cheeseweb.eu (although since I’ve uninstalled the plugin it now works fine).
- The topic ‘Using NULL $wp_query objects forced me to uninstall’ is closed to new replies.