I was/am trying to find out why
[14-May-2012 20:26:17] PHP Fatal error: Class name must be a valid object or a string in /Users/johnrobens/NetBeansProjects/ecolsoc-mgr/web/sites/all/modules/contrib/notifications/notifications.subscription.inc on line 99
[14-May-2012 20:26:17] PHP Stack trace:
Looks like $class is an array for older style (status module) definitions of 'subscription types' - without 'class' defined.
May as well clean up the code though if it really does't do anything. See patch.
Would be nice if notifications.subscription.inc was changed to :
add "
if is_array($class) { drupal_status("Old subscription specification. Please update your module"); }
before the return new class.
public static function build_object($subscription) {
if (is_object($subscription) && is_a($subscription, 'Notifications_Subscription')) {
return $subscription;
}
else {
$subscription = (object)$subscription;
$class = self::type_info($subscription->type, 'class', 'Notifications_Subscription');
return new $class($subscription);
}
}
Comments
Comment #1
jacob.embree commented$datais set in theforeach.