Can't use object of type ... as array in PHP 5.4.14-1~quantal+1

30 views
Skip to first unread message

Konzertheld

unread,
Apr 22, 2013, 1:14:54 PM4/22/13
to habar...@googlegroups.com
I recently upgraded to PHP 5.4.14-1~quantal+1 and now I get this error in my copy of Habari 0.10 (c9bcc314a6b199a592be3563bd6bd4774d3ce638):

Fatal error: Cannot use object of type Habari\TheViewInside as array in /var/www/habari/system/classes/pluggable.php on line 139

I tracked it down and it appears that's because when Pluggable checks if a the priority array contains an entry for the hook (in Pluggable::load_hooks), $priorities is set to $this. I am not using priorities, so I removed the code where $priorities appeared, so $priorities was unused in the function. Still it equaled $this. I then solved it by setting $priorities to NULL at the beginning of Pluggable::load_hooks(), but still it's strange behaviour.

The theme I am using is here: https://github.com/habari-extras/TheViewInside

I was not (yet) able to reproduce that issue with a different theme, but maybe someone has an idea what the reason is, or someone comes across this when looking for a solution to the same problem. It also does not appear in master, but half Habari has changed since the version I use.

Konzertheld

unread,
Apr 22, 2013, 5:46:07 PM4/22/13
to habar...@googlegroups.com
I forgot to mention when the error occured. I get it always when I try to save a post when my session timed out while writing. When I re-login, the error appears. It disappears after a refresh of the page, but the form content is lost.

The fix I mentioned above only makes the error message disappear. The form content is still lost.
Reply all
Reply to author
Forward
0 new messages