Title: PHP Warning Bug
Last modified: September 12, 2017

---

# PHP Warning Bug

 *  Resolved [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-bug/)
 * I’m using version 3.2.18 and made a new post this morning and I got a PHP Warning
   logged as follows:
 * PHP Warning: Invalid argument supplied for foreach() in /home/myserver/public_html/
   mydomain.com/wp-content/plugins/wp-to-twitter/wp-to-twitter.php on line 1083
 * I did some bug hunting and it seems it’s because there is an option called ‘wpt_use_cats’
   that is expected to be ‘1’ or ‘0’ but on my site was unset, this meant that the
   evaluation on line 1079 indicates I use tags (when I do not) and so the code 
   went off down a blind alley.
 * I fixed this by changing the setting in the Advanced tab but as a fix perhaps
   this setting should be set by default as something so it doesn’t return ‘false’
   due to is not existing.

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

 *  [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-bug/#post-9489476)
 * Same error this morning.
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-bug/#post-9490493)
 * Should be fixed. It wasn’t a problem with the option value; it was a different
   change, to how I was handling the results of the tag query.
 *  Thread Starter [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-bug/#post-9490524)
 * [@joedolson](https://wordpress.org/support/users/joedolson/)
 * Thanks for the rapid response – I’ll update and let you know if it happens again.
 *  [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-bug/#post-9490551)
 * Agreed. Thank you.

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

The topic ‘PHP Warning Bug’ is closed to new replies.

 * ![](https://ps.w.org/wp-to-twitter/assets/icon-256x256.png?rev=2997308)
 * [XPoster - Share to Bluesky and Mastodon](https://wordpress.org/plugins/wp-to-twitter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-to-twitter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-to-twitter/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-to-twitter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-to-twitter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-to-twitter/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Revived](https://wordpress.org/support/users/revived/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-bug/#post-9490551)
 * Status: resolved