diff --git a/lib/Doctrine/Connection.php b/lib/Doctrine/Connection.php index a5e5042b2..9b7c29705 100644 --- a/lib/Doctrine/Connection.php +++ b/lib/Doctrine/Connection.php @@ -469,7 +469,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return false; } // 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 $query = 'INSERT INTO ' . $this->quoteIdentifier($table) diff --git a/lib/Doctrine/Transaction.php b/lib/Doctrine/Transaction.php index edec8cf96..628285aef 100644 --- a/lib/Doctrine/Transaction.php +++ b/lib/Doctrine/Transaction.php @@ -129,17 +129,9 @@ class Doctrine_Transaction extends Doctrine_Connection_Module */ public function addInvalid(Doctrine_Record $record) { - /** - * 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; - } + if (in_array($record, $this->invalid, true)) { + return false; } - $this->invalid[] = $record; return true; }