Only variables should be passed by reference in lib_Zend_Db_Select line 246

Wednesday, 13. June 2012

Had this strange error today while doing a database backup via Magento admin

Strict Notice: Only variables should be passed by reference  in ../lib/Zend/Db/Select.php on line 246
Trace:
#0 ../lib/Zend/Db/Select.php(246): mageCoreErrorHandler(2048, 'Only variables ...', '/var/www/client...', 246, Array)
...

After a bit of digging around, the issue was simply solved by doing the following:

– Navigate to: /lib/Zend/Db/Select.php and go to live 246

Find:

$correlationName = current(array_keys($this->_parts[self::FROM]));

– Replace that with

$correlationName = array_keys($this->_parts[self::FROM]);
$correlationName = $correlationName[0];

Please NOTE:
You have just edited the core file there. I will recommend you take a note of this for future reference.

Tags: , , .

Leave a Reply

You must be logged in to post a comment.