Segmentation fault using foreach on a stackable object if empty #152

doshu opened this Issue Aug 13, 2013 · 1 comment


None yet
2 participants

doshu commented Aug 13, 2013

the following code cause a segmentation fault. i have tested it in the latest stable release of php 5.4 and 5.5.

class StackableArray extends Stackable {


$foo = new StackableArray();

foreach($foo as $x) {
echo $x;

but if I insert an element in the StackableArray like $foo[] = 'lol', all works correctly.

i think there are no checkings on the size of the objects, and accessing a non existent index cause a seg fault.

krakjoe closed this in 840a914 Aug 13, 2013


krakjoe commented Aug 13, 2013

Thanks ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment