eZ Community » Forums » Developer » Removing fatal error on unknown...

Removing fatal error on unknown $object->attribute() php call

Removing fatal error on unknown $object->attribute() php call

Tuesday 19 June 2012 1:20:12 pm - 3 replies


How can we cleanly (= with no modification to ezp distribution files) remove ezp behavior that return a fatal error when calling 'attribute' method on an object that doesn't have it.

In case of large DB with ezfind some objects are corrupted because present in solr index but not in ezpublish db anymore. In this case the whole page crash even if only one of the object is corrupted.

Classic message is :

Fatal error: Call to undefined function: attribute() in /home/langenfe/public_html/kernel/classes/ezcontentobjecttreenode.php on line 2258
Fatal error: eZ Publish did not finish its request

Thank you in advance.

Modified on Tuesday 19 June 2012 1:34:49 pm by H-Works Agency

Tuesday 19 June 2012 2:30:55 pm

You can override the kernel class ezcontentobjecttreenode.php and test if object exist before calling function attribute

Tuesday 19 June 2012 3:05:43 pm

I think this is a bug and should be fixed in the kernel. A corrupt ezfind index should not crash the site!

So if you have a fix for your problem - you should open a bugreport on issues.ez.no.

Tuesday 19 June 2012 3:17:01 pm

Thank you, i am gonna try the kernel class override and open a bug ticket.

Cheers !


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from