1

After upgrading my site to php 7. I have been constantly getting this error regarging the parameter to native wordpress function wp_default_style(). Spent so many days to fix it but was not able to do so. Any idea or help will be much appreciated. The error shown in newrelic is below:

Stack trace
E_WARNING: Parameter 1 to wp_default_styles() expected to be a reference, 
value given
in call_user_func_array called at /nas/content/live/wp- 
includes/class-wp-hook.php (286)
in WP_Hook::apply_filters called at /nas/content/live/wp- 
includes/class-wp-hook.php (310)
in WP_Hook::do_action called at /nas/content/live/wp- 
includes/plugin.php (515)
in do_action_ref_array called at /nas/content/live/wp- 
includes/class.wp-styles.php (116)
in WP_Styles::__construct called at /nas/content/live/wp- 
includes/functions.wp-styles.php (23)
in wp_styles called at /nas/content/live/wp- 
includes/functions.wp-styles.php (123)
in wp_register_style called at /nas/content/live/wp- 
content/plugins/the-events-calendar/common/src/Tribe/Assets.php (65)
in Tribe__Assets::register_in_wp called at ? (?)
in call_user_func_array called at /nas/content/live/wp- 
includes/class-wp-hook.php (284)
in WP_Hook::apply_filters called at /nas/content/live/wp- 
includes/class-wp-hook.php (310)
in WP_Hook::do_action called at /nas/content/live/wpincludes/plugin.php (453)
in do_action called at /nas/content/live/wp-settings.php (450)
in require_once called at /nas/content/live/wp-config.php (130)
in require_once called at /nas/content/live/wp-load.php (37)
in require_once called at /nas/content/live/wp-blog-header.php (13)
in require called at /nas/content/live/index.php (17)

Found this ticket (https://core.trac.wordpress.org/ticket/37772) but is there another way which can fix the problem without touching wordpress core?

4
  • What version of WordPress are you on? That ticket you linked to claims that this was fixed in 4.7 or 4.7.1. – socki03 Oct 12 '18 at 19:13
  • 1
    version 4.9.8 and still same error for me. – SDahal Oct 12 '18 at 20:33
  • 2
    It appears to be generated from The Events Calendar, is that plugin up-to-date? If so, have you tried deactivating and reactivating it? – socki03 Oct 12 '18 at 20:49
  • Thanks, Looks like it has something to do with the errors. Because the error rate dropped to 50% of what it used to be when I disabled the plugin but just upgrading the plugin didn't work for me. – SDahal Oct 16 '18 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.