Error handling when unable to connec to twitter
Permalink Browser Info Environment
Hey jereme,
First off...great block, I'm about to give you a rave review :)
Just wanted to mention one thing I think might help out a little...not even your fault really, but when the block can't connect to twitter I was getting an ugly PHP error message about invalid foreach on line 77 in controller.php. I modified my installation of this block and just added an if statement to confirm that $twitterTimeline is an array before looping, and handle the error nicely otherwise.
Just wanted to throw that out there!
First off...great block, I'm about to give you a rave review :)
Just wanted to mention one thing I think might help out a little...not even your fault really, but when the block can't connect to twitter I was getting an ugly PHP error message about invalid foreach on line 77 in controller.php. I modified my installation of this block and just added an if statement to confirm that $twitterTimeline is an array before looping, and handle the error nicely otherwise.
Just wanted to throw that out there!
Type: | Discussion |
---|---|
Status: | New |
The new version of tweetcrete (1.3) handles this more gracefully through two methods.
The first is that when it makes a successful connection to the Twitter API, it caches the result for use in case it can't connect to Twitter later.
The second is that if there are no posts in the timeline, it simply says so instead of erroring.
The new version also adds retweet support! :)
Jereme
The first is that when it makes a successful connection to the Twitter API, it caches the result for use in case it can't connect to Twitter later.
The second is that if there are no posts in the timeline, it simply says so instead of erroring.
The new version also adds retweet support! :)
Jereme
Hi Jereme,
Cheers for the reply, i only installed tweetcrete the other day so Im guessing it was 1.3.
Going to monitor the situation tonight and see if same error occurs.
Cheers
Cheers for the reply, i only installed tweetcrete the other day so Im guessing it was 1.3.
Going to monitor the situation tonight and see if same error occurs.
Cheers
Cheers