[amadeus] Changed getFirst to use reset function for proper behavior on empty
This commit is contained in:
parent
91ffb0845b
commit
a33e2b89c8
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue