Fatal error: Call to a member function expire() on a non-object in /site_root/sites/all/modules/contrib/expire/expire.module on line 253

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

petermallett’s picture

Assigned: petermallett » Unassigned
Status: Active » Needs review
FileSize
733 bytes

I don't know at this time what the value for $type was that is causing _expire_get_expiration_handler to return FALSE, but in any case, we cannot call a method on FALSE, so I have added a check for the return value in expire_execute_expiration.

Spleshka’s picture

Status: Needs review » Needs work

As far as I remember, it was designed exactly to get this error. If you use module's functionality out of the box you won't see this error, because all handlers are pre-defined. If you want to use your own handlers and you set them up wrong, then i would prefer to display this error to indicate that class wasn't actually loaded, then just a silent exception handling.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
1.04 KB

However, the current way stops all execution on the current request. It would be nice if we logged the error instead of stopping execution since this isn't something that should bring down a site if it's not working properly.

  • Spleshka committed f724c07 on 7.x-2.x authored by Dave Reid
    Issue #2337057 by petermallett, Dave Reid, Spleshka: Fatal error if a...
Spleshka’s picture

Status: Needs review » Fixed

Okay, I see you point. I really can't say which way I would prefer better - keep existing behavior or make it not that hard, for me both is okay. So if you guys think the new behavior is better, then I don't see any problems in taking your side. Thanks for your patches!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.