tlack / snaphax

A PHP library to use the Snapchat API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Warning: Invalid argument supplied for foreach()

evenh opened this issue · comments

When I try to run the example-script I get the following warning:

user@host ~/snaphax/examples $ php fetch_all_new_photos.php <username> <password> NULL PHP Warning: Invalid argument supplied for foreach() in /home/user/snaphax/examples/fetch_all_new_photos.php on line 27

I just pushed a tiny patch to the example script to bomb out if you don't have any snaps.

But I am pretty surprised that you're seeing that NULL there - it seems like you aren't getting any response from the server at all. Can you turn on debugging and try to figure out at what point it's dying? Alternatively, send the log to lackner@gmail.com - but it may contain personal info so I understand if you don't feel comfortable.

I sent a debug log to you :-)