Commit 51f957bc authored by gnat's avatar gnat

set a limit on fetchOne queries

parent 872bb1ac
......@@ -157,7 +157,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract
*/
public function fetchOne($params = array(), $hydrationMode = null)
{
$collection = $this->execute($params, $hydrationMode);
$collection = $this->limit(1)->execute($params, $hydrationMode);
if (count($collection) === 0) {
return false;
......
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