Title: PHP error in StormTwitter.class.php
Last modified: August 21, 2016

---

# PHP error in StormTwitter.class.php

 *  [Alec Rust](https://wordpress.org/support/users/alecrust/)
 * (@alecrust)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/)
 * I’ve recently upgraded to WordPress 3.5.2 and am noticing the following error
   in the place of my Twitter feed using this plugin:
 * **Warning:** array_slice() expects parameter 1 to be array, null given in **/
   public_html/wp-content/plugins/oauth-twitter-feed-for-developers/StormTwitter.
   class.php** on line **71**
 * Is this an issue with the plugin or my implementation (which uses [your example](https://github.com/stormuk/storm-twitter-for-wordpress/wiki/Example-code-to-layout-tweets))?
 * [http://wordpress.org/extend/plugins/oauth-twitter-feed-for-developers/](http://wordpress.org/extend/plugins/oauth-twitter-feed-for-developers/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [redearthdesign](https://wordpress.org/support/users/redearthdesign/)
 * (@redearthdesign)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/#post-3866850)
 * Maybe that line can be wrapped in an if(is_array()?
 *  [Naz](https://wordpress.org/support/users/naz/)
 * (@naz)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/#post-3866860)
 * Experiencing the same problem. It was fine a few weeks ago and suddenly (I didn’t
   even change anything) it’s been giving me this error and my feed won’t show up.
 * Does anyone have a fix for this? Thanks!
 * Edit: Figured it out. As redearthdesign mentioned, use is_array(). I’m using 
   the following code now and it works:
 *     ```
       if (is_array(getTweets(1)))
       {
       $tweets = getTweets(1);
   
       foreach ($tweets as $tweet)
       {
       // The rest of your code
       }
       }
       ```
   
 *  Thread Starter [Alec Rust](https://wordpress.org/support/users/alecrust/)
 * (@alecrust)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/#post-3866877)
 * Didn’t work for me I’m afraid, same error persists. I too made no changes.
 *  Plugin Author [Liam Gladdy](https://wordpress.org/support/users/lgladdy/)
 * (@lgladdy)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/#post-3866896)
 * Not sure why a WordPress upgrade will break this – but i’ll get it fixed – we
   should be validating that is an array anyway in any example output!
 *  Thread Starter [Alec Rust](https://wordpress.org/support/users/alecrust/)
 * (@alecrust)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/#post-3866897)
 * That would be great, thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP error in StormTwitter.class.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/oauth-twitter-feed-for-developers.
   svg)
 * [oAuth Twitter Feed for Developers](https://wordpress.org/plugins/oauth-twitter-feed-for-developers/)
 * [Support Threads](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 5 replies
 * 4 participants
 * Last reply from: [Alec Rust](https://wordpress.org/support/users/alecrust/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/php-error-in-stormtwitterclassphp/#post-3866897)
 * Status: not resolved