Running PHP 5.3+ the Drupal 6 Autoload module (unsure about d7) barks at me about the Messaging module with the following error messages:

Strict warning: Static function Messaging_Object::db_table() should not be abstract in _autoload_registry_check_code() (line 183 of autoload.module).
Strict warning: Static function Messaging_Object::db_key() should not be abstract in _autoload_registry_check_code() (line 183 of autoload.module).
Strict warning: Static function Messaging_Object::load() should not be abstract in _autoload_registry_check_code() (line 183 of autoload.module).
Strict warning: Static function Messaging_Object::build() should not be abstract in _autoload_registry_check_code() (line 183 of autoload.module).
Strict warning: Static function Messaging_Cached_Object::cache_set() should not be abstract in _autoload_registry_check_code() (line 183 of autoload.module).
Strict warning: Static function Messaging_Cached_Object::cache_get() should not be abstract in _autoload_registry_check_code() (line 183 of autoload.module).
Strict warning: Declaration of Messaging_Cached_Object::object_load() should be compatible with Messaging_Object::object_load($table, $key, $value, $class = NULL) in _autoload_registry_check_code() (line 183 of autoload.module).

Back-story and details here: http://stackoverflow.com/a/31235907/413538

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilson3 created an issue. See original summary.

jwilson3’s picture

Assigned: jwilson3 » Unassigned
Status: Active » Needs review
FileSize
2.67 KB

This patch does a couple things

  1. move the abstract static methods of two classes into an interface and then has the respective class implement the interface.
  2. fix the method signature of Messaging_Cached_Object::object_load() to match the parent (it was missing = NULL.
jwilson3’s picture

Issue summary: View changes
GreenSkunk’s picture

This patch works for one of the sites I'm maintaining.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

I use this but it may need a reroll.

joelpittet’s picture

FileSize
2.06 KB

Re-rolled

skylord’s picture

Hm. It seems you forgot some lines from #2 while rerolling...

joelpittet’s picture

I may have done that on purpose but can't remember off hand why... (should have commented though...) thanks for adding those back in and checking @skylord