Support Forum
Hi,
After upgrading to Wordpress 3.9 and Simple:Press 5.4.2 the following message is displayed at the top of the forum :
Warning: Invalid argument supplied for foreach() in /wp-content/plugins/simple-press/forum/content/classes/sp-list-topic-class.php on line 416
Can you please tell me how to remove it ?
Best Regards,
Fabien
have you had any new posts since the upgrade? I suspect one new post will make it disappear but may need Andy to confirm... this a new cache put in place and yours seems to not be primed... obviously if thats the case we need to handle that situation but need some confirmation first...
Visit Cruise Talk Central and Mr Papa's World
Actually this should not be an issue unless you have absolutely no posts in the forum at all. I have reworked the code so that it will no longer show up as a warning but the fact that you are seeing this is puzzling as if empty it should have been rebuilt.
I would be interested to know if this is seen on every page load and - if it does, indeed, go away when a new post is made.
Meanwhile I would really advise you against showing ANY errors like this. It discloses the path of the site to the casual observer and the recommended procedure is always to log these and not display them. I would personally be having very strong words with my host if this were my site!
YELLOW
SWORDFISH
|
Hello, I hope I am not overstepping my bounds, but I got the very same error on my site, so I just chose to piggy back this post.
And yes, it is showing up so will have to discuss that with the host, however, let me tell you this.
I only installed 5.4.2 yesterday, and when I went in to start creating forums, this is the error that came up, exactly like posted above.
Thinking I would just have to submit a post and it would clear up, I came up with these errors:
Warning: array_unshift() expects parameter 1 to be array, string given in /wp-content/plugins/simple-press/sp-api/sp-api-class-post.php on line 457
Warning: Cannot modify header information - headers already sent by (output started at wp-content/plugins/simple-press/sp-api/sp-api-class-post.php:457) in /wp-includes/pluggable.php on line 1121
I had to back up, and refresh the page, and now it's showing my topic and the error message is gone.
Any thoughts?
Afraid it was caused by the same condition - no posts. At the time of writing the post there were still none in the database so it came up with the same warning. The headers already sent error was caused by the fact that the first real error (Warning) was printed to the display.
Apologies for it happening but once there is at least one post in the database all should then be well and these are fixed up in the next update...
YELLOW
SWORDFISH
|
1 Guest(s)