Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Catchable fatal error with 2.8.0 #147

Closed
ipoweb opened this issue Oct 27, 2015 · 5 comments
Closed

PHP Catchable fatal error with 2.8.0 #147

ipoweb opened this issue Oct 27, 2015 · 5 comments
Milestone

Comments

@ipoweb
Copy link

ipoweb commented Oct 27, 2015

Hi,
with last version, i get an error

PHP Catchable fatal error: Argument 1 passed to QM_Output_Html_Assets::dependency_row() must be an instance of _WP_Dependency, boolean given, called in /httpdocs/wp-content/plugins/query-monitor/output/html/assets.php on line 105 and defined in /httpdocs/wp-content/plugins/query-monitor/output/html/assets.php on line 113

@johnbillion
Copy link
Owner

Thanks @sireneweb, can you try deactivating your plugins one by one to see if you can determine which plugin is causing the problem and then let me know? It might also be your theme, in which case please let me know which theme you're using.

Thanks.

@jemdev
Copy link

jemdev commented Nov 1, 2015

Hi,
I've got another error with this version at the end of updating process : message shown is as following :
Fatal error: Class QM_Output_Html cannot extend from interface QM_Output in ....\wp-content\plugins\query-monitor\output\Html.php on line 211

I've not checked the code to find the source of the error. Hope this may help.

@johnbillion
Copy link
Owner

@jemdev The fatal error during update is a known issue and is not something I'll be fixing. It's due to the fact that QM hooks into the shutdown hook which runs after the plugin update, so you get some code which loads before the plugins gets updated, and some code which loads after it, and thus you get a fatal error if the structure of some of the classes have been changed.

@johnbillion
Copy link
Owner

@sireneweb Any news?

@johnbillion
Copy link
Owner

Turns out this happens under a particularly specific situation where a footer-enqueued asset is deregistered later in the page. Example:

add_action( 'wp_enqueue_scripts', function() {
    wp_enqueue_script( 'foo', 'http://example.com/example.js' );
} );

add_action( 'wp_print_footer_scripts', function() {
    wp_deregister_script( 'foo' );
} );

@johnbillion johnbillion added this to the 2.8.2 milestone Feb 23, 2016
@johnbillion johnbillion modified the milestones: 2.8.2, 2.9.0 Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants