Recent Topics

1 Jan 11, 2007 03:39    

After upgrading by blog from b2evo v 0.9.0.12 to ver. 1.9.1 I get the following error:

Notice: Only variable references should be returned by reference in /home/alkha4/public_html/ar_blog/inc/MODEL/dataobjects/_dataobjectcache.class.php on line 121

What does this mean?

Thanks

2 Jan 11, 2007 05:07

See http://forums.b2evolution.net/viewtopic.php?t=10133&highlight=121 for more on this topic.

Summary:
Find blogs/inc/MODEL/dataobjects/_dataobjectcache.class.php around line 121 where it sais:

       /**
         *  TODO
         */
        function & new_obj( $row = NULL )
        {
                $objtype = $this->objtype;

                // Instantiate a custom object
                $obj = new $objtype( $row ); // COPY !!

                return $obj;
        }


an change $obj = new $objtype( $row ); in $obj = & new $objtype( $row );
This should help for the problem on the blog. There are a few simular errors, but they occur only in the backoffice and -to my knowledge- do not affect the functioning. The error occurs *after* it encounters a last topic in a list.

The problem occurs if you are using PHP version 4.4.0 or an early 5 version.

3 Jan 11, 2007 05:20

Thanks Afwas. I don't get the error any more.

5 Feb 19, 2007 04:27

I tried the patch but it gives so many errors. Using "&" solves the problems. The last one I encounter was in:

Notice: Only variable references should be returned by reference in /home/alkha4/public_html/blog/inc/MODEL/generic/_genericcache.class.php on line 67

When I try to access the post statuses.

I replaced:

$obj =  new $objtype( $this->dbtablename, $this->dbprefix, $this->dbIDname, $row ); // Copy

With this:

$obj = & new $objtype( $this->dbtablename, $this->dbprefix, $this->dbIDname, $row ); // Copy

And I don't get the error.

6 Feb 19, 2007 23:10

Just for the record, kskhater is using PHP 4.4.4 with Zend Optimizer v2.5.10, which may be the cause of the problem (according to the phpinfo file in the install folder!).


Form is loading...