ZF-2113: $where not properly initialized in _cascadeDelete()


The variable $where is not properly initialized in the reference map loop in _cascadeDelete():

should be

case self::CASCADE: $where = array();```

Apart from the fact that the variable isnt initialized correctly itself, the where clauses are just added to the $where stack for each reference loop.


Is there any reason why this bug isn't fixed so far (its still unfixed in 1.5.0RC3)? This makes working with references impossible...

Please categorize/fix as needed.

Resetting 'fix version priority' and 'fix version' to be re-evaluated for next release.

Must Have for Next Mini Release

~jsorgalla], if you were to [submit a CLA, you could commit fixes like these yourself and increase the impact of your contributions to ZF! Of course, thank you for the report! :)

Solved in SVN r11042. I fix not only _cascadeDelete function but also _cascadeUpdate function in /Zend/Db/Table/Abstract.php .

Because _cascadeUpdate function has also same problem as _cascadeDelete function , I think.

Please merge this to the 1.6 release branch.