Commit a33e2b89 authored by doctrine's avatar doctrine

[amadeus] Changed getFirst to use reset function for proper behavior on empty

parent 91ffb084
...@@ -157,7 +157,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator ...@@ -157,7 +157,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
* @return mixed * @return mixed
*/ */
public function getFirst() { public function getFirst() {
return $this->data[0]; return reset($this->data);
} }
/** /**
* @return mixed * @return mixed
......
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