diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index cec21e368..9041b3fb5 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -882,10 +882,10 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable $identifier = $this->_conn->quoteIdentifier($tableAlias . $field); if ($index > 0) { - $b[] = '(' . $identifier . ' = ' . $value + $b[] = '(' . $identifier . ' = ' . $this->_conn->quote($value) . ' OR ' . $identifier . ' IS NULL)'; } else { - $b[] = $identifier . ' = ' . $value; + $b[] = $identifier . ' = ' . $this->_conn->quote($value); } } @@ -987,7 +987,6 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable } while ($data = $stmt->fetch(Doctrine::FETCH_ASSOC)) { - $parse = true; foreach ($data as $key => $value) {