Support Forum

BUG found: php warning

BL Blaise
Blaise
Member

Hi,

I am getting the following PHP Warning:

PHP Warning:  in_array() expects parameter 2 to be array, string given in /wp-content/plugins/simple-press/forum/content/classes/sp-list-topic-class.php on line 337

 

Line 337 is:

if (in_array($topic, $spThisUser->newposts[‘topics’]))

 

It seems that under some circumstances $spThisUser->newposts[‘topics’] is considered a string.

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

It’s not really anything serious – just a nuisance. And it is fixed in the forthcoming update due to be released with the next version of WordPress.

UN
Unknown
Member

Is there a work around for it?   Have several users getting it and freaking out lol…

MP Mr Papa
Mr Papa
Member

its an involved fix for a nuisance warning… and will be in the next version which will release when wp 4.7 is released – tentatively scheduled for next week (but no firm confirmation from wp devs yet)…

in the meantime, you should really turn off error logging (errors, warnings, and notices) on a production site… quite bad practice to be showing those…