Commit 666e2f3f authored by jackbravo's avatar jackbravo

Nesting level too deep because using in_array, fixed

parent b01212e2
......@@ -129,9 +129,17 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
*/
public function addInvalid(Doctrine_Record $record)
{
if (in_array($record, $this->invalid)) {
/**
* for some weird reason in_array cannot be used here (php bug ?)
*
* if used it results in fatal error : [ nesting level too deep ]
*/
foreach ($this->invalid as $val) {
if ($val === $record) {
return false;
}
}
$this->invalid[] = $record;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment