Continue after Warning

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nitsujri
Forum Newbie
Posts: 1
Joined: Thu Sep 10, 2009 12:50 pm

Continue after Warning

Post by nitsujri »

Hi Guys,

I did a basic search and came up empty handed. So I'm hoping you guys can help me out:

I'm doing an HTTP request to twitter to get the number of followers that I have. Everything works great except sometimes the system doesn't respond properly and I get a warning back. Sometimes it's a 404 sometimes I get a valid page but it doesn't contain the DOM element that I'm looking for so I get a warning further down the line at a removeChild call.

I'm cool with getting the warning and I can suppress it with @, but the script stops as if it was a fatal error? Is this expected behavior and if so, is there a way I can continue after getting the warning?

Thanks all in advanced :banghead: !

P.S. The original code can be found here at tip #3:

http://www.instantshift.com/2009/05/25/ ... ress-blog/
Post Reply