Hi all. First of all thanks for all the hard work to the people here at themoviedb.org for your API. I'm using the php wrapper by glamorous and I was wondering if there was an elegant way to catch when it doesn't get a result? right now it's breaking my layout when I try to find something that doesn't exist, etc. Thanks
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on January 10, 2014 at 11:30 AM
Hi stereotyped,
I can't provide you specific help with that wrapper but empty results are just an empty
results
array:You should be able to just check for an empty array and conditionally show your results or some kind of "nothing found" message.
Cheers.
Reply by stereotyped
on January 10, 2014 at 5:39 PM
https://github.com/glamorous/TMDb-PHP-API
This is what i'm using. Maybe someone else can help me with it. The problem is it doesn't return an empty array but it throws an exception which i'm unsure of how to check that :/