set a limit on fetchOne queries
This commit is contained in:
parent
872bb1acd5
commit
51f957bcba
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user