Posted by & filed under Documentation, PHP.

Having problems with your (older) Magento install on your (newer) PHP?

Some versions of Magento have been using the ‘current‘ function incorrectly.

If you experience the following error:

Strict Notice: Only variables should be passed by reference in ..lib/Zend/Db/Select.php on line 216

A simpler fix may just be to change two files:

File One: lib/Zend/Db/Select.php
Find:
$correlationName = current(array_keys($this->_parts[self::FROM]));

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

File Two: Toolbar.php
Find:
return current(array_keys($this->_availableMode));

Replace With:
$arrayKeys = array_keys($this->_availableMode);
return current($arrayKeys);

Leave a Reply

Your email address will not be published. Required fields are marked *