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.
The topic ‘PHP Warning Bug’ is closed to new replies.