Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

doshu opened this Issue · 1 comment

2 participants


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 krakjoe closed this issue from a commit
krakjoe fix #152 840a914
@krakjoe krakjoe closed this in 840a914

Thanks ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.