Skip to content

Commit 845a6a4

Browse files
committed
Fix reverse order for elements() method
1 parent 65f1512 commit 845a6a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TgUtils/Stack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function peek() {
4242

4343
/** Returns the stack elements with top element first */
4444
public function elements($reverse = FALSE) {
45-
return $reverse ? array_reverse($this->stack) : $this->stack;
45+
return $reverse ? $this->stack : array_reverse($this->stack);
4646
}
4747

4848
}

0 commit comments

Comments
 (0)