ZF-8790: CLONE -Strict Standards: Only variables should be passed by reference in Zend/Db/Select.php on line 246

Issue Type: Bug Created: 2010-01-12T08:38:07.000+0000 Last Updated: 2010-01-12T22:16:09.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Daniel Ott (thedott) Assignee: Satoru Yoshida (satoruyoshida) Tags: - Zend_Db_Select

Related issues: - ZF-7975

Attachments: - Zend_Db_Select.php.diff


The error comes from lin 246 where array_keys() is wrapped in current().

This is triggering the error: Only variables should be passed by reference

<pre class="highlight">
if ($correlationName === null && count($this->_parts[self::FROM])) {
 $correlationName = current(array_keys($this->_parts[self::FROM]));

This can be prevented with:

<pre class="highlight">
if ($correlationName === null && count($this->_parts[self::FROM])) {
 $correlationNameKeys = array_keys($this->_parts[self::FROM]);
 $correlationName = current($correlationNameKeys);


Posted by Daniel Ott (thedott) on 2010-01-12T08:38:51.000+0000

Release 1.9.7 has the old code still in place.

Posted by Satoru Yoshida (satoruyoshida) on 2010-01-12T22:16:09.000+0000

It is duplicate of ZF-7975.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.