Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I just upgraded an Aegir 2 server to Debian Wheezy, which comes with PHP 5.4. It throws a bunch of errors:
strict warning: Non-static method view::load() should not be called statically in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/views.module on line 1113.
strict warning: Declaration of views_handler_field::query() should be compatible with views_handler::query($group_by = false) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_sort::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_sort::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_sort::query() should be compatible with views_handler::query($group_by = false) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_filter::query() should be compatible with views_handler::query($group_by = false) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_relationship::query() should be compatible with views_handler::query($group_by = false) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_area::query() should be compatible with views_handler::query($group_by = false) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_area_text::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_plugin_query::options_submit() should be compatible with views_plugin::options_submit($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_bulk_operations_plugin_style::options_submit() should be compatible with views_plugin::options_submit($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Non-static method view::load() should not be called statically in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/views.module on line 1113.
strict warning: Non-static method view::load() should not be called statically in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/views.module on line 1113.
strict warning: Declaration of views_handler_argument::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_handler_argument::query() should be compatible with views_handler::query($group_by = false) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
strict warning: Declaration of views_plugin_argument_validate::options_submit() should be compatible with views_plugin::options_submit($form, &$form_state) in /var/aegir/hostmaster-6.x-2.0-rc2/profiles/hostmaster/modules/views/includes/handlers.inc on line 98.
These all appear due to Views maintaining backward compatibility with PHP 4, and so they cannot be fixed.
To suppress these errors, we can drop something like the following into a local.settings.php:
error_reporting(0);
Unfortunately, this turns errors off entirely, not just E_STRICT ones. So far, my attempts to find a way to only suppress E_STRICT errors via settings.php have been fruitless. I'm going to explore other options, but I'd love to hear from others who might already have fixed this.
Comment | File | Size | Author |
---|---|---|---|
#8 | views-estrict-2060727-8.patch | 18.97 KB | nitishchopra |
Comments
Comment #1
ergonlogicI believe removing just E_STRICT via error_reporting() is not possible due to Drupal's custom error handler. There's a patch for Drupal 6.28 over in #1954296: Restore original D6 behaviour to prevent logging E_STRICT warnings that we should consider applying to core in our makefile.
Comment #2
ergonlogicAdding such a patch would require us to specify a Drupal core version in our makefiles, so that Aegir doesn't break as soon as a 6.29 (or whatever version fixes this issue) comes out. I don't see any other way, though...
Comment #3
ergonlogicFixed in 6f0275f. We should revert this once it's fixed in core, so setting as postponed.
Comment #4
ergonlogicFYI, the commit in #3 is in Provision, since it affected aegir.make.
Comment #5
kerolar CreditAttribution: kerolar commentedPlease can someone explain how to make this error go away for a newbie. I have just installed Aegir with PHP 5.4.26 and it's driving me crackers.
Comment #6
helmo CreditAttribution: helmo commented@kerolar: #3 was a core patch to reduce the noice. You can also masq some of the pain on the admin/settings/error-reporting page
Comment #7
kerolar CreditAttribution: kerolar commentedThanks helmo. After I installed 6.x-2.0 the Drupal version was 6.29, I then updated to 6.30 in the hostmaster directory with drush. Later I reinstalled (for other reasons), didn't update and the error hasn't appeared, so I issued this:
and noticed 6.28.patch? I'm still working my way through the documentation, should I have updated the frontend to 6.30 another way?
Cheers
Comment #8
nitishchopra CreditAttribution: nitishchopra commentedHi to solve these warnings I created a patch.
Comment #9
helmo CreditAttribution: helmo commented@nitishchopra: sorry but your patch had multiple unrelated changes. You might wanna have a look in the views issue queue for similar patches: https://drupal.org/project/issues/views?text=E_STRICT&status=All
@kerolar: The common.inc_6.28.patch patch also applies to 6.30
Setting status back to postponed, as #1954296: Restore original D6 behaviour to prevent logging E_STRICT warnings is the one that needs to be fixed first.
Comment #10
ergonlogicThe 6.x-2.x branch will go EOL along with Drupal this week. So I'm closing this issue. If it remains a confirmed issue in 7.x-3.x, feel free to re-open, or better yet, create a new issue referencing this one.