Skip to content
This repository was archived by the owner on Jun 10, 2022. It is now read-only.

Commit 8875b1b

Browse files
committed
Fixed methods to get first and last elements in stack
1 parent 3429238 commit 8875b1b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/CS/DataGridBundle/Util/ArrayStack.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ public function rewind()
176176
*/
177177
public function first()
178178
{
179-
$key = min($this->elements);
180179

181180
return $this->offsetGet($key);
182181
}
@@ -188,7 +187,7 @@ public function first()
188187
*/
189188
public function last()
190189
{
191-
$key = max($this->elements);
190+
$key = max(array_keys($this->elements));
192191

193192
return $this->offsetGet($key);
194193
}

0 commit comments

Comments
 (0)