1 afwas Jan 08, 2007 06:07
I commented in http://forums.b2evolution.net/viewtopic.php?t=10133 about a PHP error. Afterwards I noticed a few more so I turned to the bugs section of the forum.
My B2evo runs on PHP 4.4.0 and MySQL 4.1.11-Debian_4sarge5
bug 1 as described in the post stated above: blogs/inc/MODEL/dataobjects/_dataobjectcache.class.php line 119 should be:
$obj = & new $objtype( $row );
New bug (2): Error after multipart post (=> more) when expanding the post and also when editing the post.
Notice: Only variable references should be returned by reference in /home/www/blog.hemminga.net/inc/MODEL/dataobjects/_dataobjectlist.class.php on line 111
In this file it reads:
function & get_next()
{
if( $this->current_idx >= $this->result_num_rows )
{ // No more comment in list
$r = false;
return $r;
}
return $this->Obj[$this->current_idx++];
}
Where line 111 is return $r; In the previous post Blueyed mentioned changing return true; in $r = true; return $r; In this instance it was already corrected, but it gave an error nontheless.
Bug 3: I noticed a few occurances of return true; and return false; in all classes in the same folder. They didn't give me an error.
4: The => of =>more doesn't render any more after upgrading to 1.9.1 (from 1.8.6). Any idea?
I hoped to give you a solution rather than a problem, but unfortunately I still don't grasp the idea of Object Oriented PHP.
GL with B2evo 2.0
I'll redirect you (again) to
http://forums.b2evolution.net/viewtopic.php?t=10133 - where the notice should get resolved finally.
As said there, it seems to be a PHP/Zend Optimizer bug.
Re "Bug 3": the "$r = false; return $r;" trick is only needed, if the function returns by reference, which it does, if there's a "&" between "function" and the name.
Re "Bug 4": that's a bug with the Auto-P plugin or the way b2evo processes pre-rendering IIRC and should be fixed in 1.9.2 or the next release (1.9.3).
Please refer to the link above about the ref-error and use this thread only for the other topics.