Commit 17913f58 authored by jackbravo's avatar jackbravo

Clearer fix for nesting level too deep bug, use in_array with strict flag (use === instead of ==)

parent 666e2f3f
...@@ -469,7 +469,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun ...@@ -469,7 +469,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
return false; return false;
} }
// column names are specified as array keys // column names are specified as array keys
$cols = array_keys($values); $cols = array();
foreach ($values as $key => $value) {
$cols[] = $this->quoteIdentifier($key);
}
// build the statement // build the statement
$query = 'INSERT INTO ' . $this->quoteIdentifier($table) $query = 'INSERT INTO ' . $this->quoteIdentifier($table)
......
...@@ -129,17 +129,9 @@ class Doctrine_Transaction extends Doctrine_Connection_Module ...@@ -129,17 +129,9 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
*/ */
public function addInvalid(Doctrine_Record $record) public function addInvalid(Doctrine_Record $record)
{ {
/** if (in_array($record, $this->invalid, true)) {
* 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; return false;
} }
}
$this->invalid[] = $record; $this->invalid[] = $record;
return true; 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