[amadeus] Changed getFirst to use reset function for proper behavior on empty
This commit is contained in:
parent
91ffb0845b
commit
a33e2b89c8
@ -157,7 +157,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFirst() {
|
||||
return $this->data[0];
|
||||
return reset($this->data);
|
||||
}
|
||||
/**
|
||||
* @return mixed
|
||||
|
Loading…
x
Reference in New Issue
Block a user