Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
public-topic
Warning erros for new users
Avatar
Chris24601
Guest
Guests
Nov 10, 2016 - 3:16 pm
sp_QuotePost Quote

If someone recently registers for a new wordpress account, and then goes to the forum page, they see a whole bunch of these errors:

Warning: Illegal string offset 'topics' in /srv/users/serverpilot/apps/culturedfoodlife/public/wp-content/plugins/simple-press/forum/content/classes/sp-list-topic-class.php on line 337

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

The errors are repeated over and over. 

I've noticed that the error will fix itself for that user the next day, but I can't just tell people to wait a day. I also noticed that I can fix it manually for a user by going into the database, into the "wp_sfmembers" table, searching for their user ID, and edit the "checktime" field to a time at least 12 hours (or more) in the past. I don't know why changing this time fixes the issue, nor why the issue is even occurring in the first place. To reproduce the issue:

Go to https://www.culturedfoodlife.c.....y-account/ and create an account (right side of screen)

Then go to https://www.culturedfoodlife.c.....ers/forum/ and you will see the errors. 

Please help!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 10, 2016 - 3:27 pm
sp_QuotePost Quote

There is a fix already coded for this warning and it is, I agree, a nuisance. But harmless.

However, you really should not be echoing errors/warnings/notices to the screen - this is a very bad practice on a production website and also can reveal pathways on your server.

No host should allow for these to be displayed and they should be turned off in the php ini file on your server. We strongly recommend you get the settings changed ASAP. Unless, of course, this is by preference or you have the WP_DEBUG settings turned on in the wp-conflg.php file.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626