Zend Framework

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.6, 1.9.7
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Db_Select
  • Labels:
    None

Description

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

if ($correlationName === null && count($this->_parts[self::FROM])) {
 $correlationName = current(array_keys($this->_parts[self::FROM]));
}

This can be prevented with:

if ($correlationName === null && count($this->_parts[self::FROM])) {
 $correlationNameKeys = array_keys($this->_parts[self::FROM]);
 $correlationName = current($correlationNameKeys);
}

Issue Links

Activity

Hide
Daniel Ott added a comment -

Release 1.9.7 has the old code still in place.

Show
Daniel Ott added a comment - Release 1.9.7 has the old code still in place.
Hide
Satoru Yoshida added a comment -

It is duplicate of ZF-7975.

Show
Satoru Yoshida added a comment - It is duplicate of ZF-7975.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: