Support Forum
Hi,
The admin bar plugin generates a warning in the apache log when the admin clicks on the "See new messages" button.
The error:
PHP Warning - Invalid argument supplied for foreach() - file: /forum-plugins/admin-bar/library/sp-admin-bar-components.php - line: 402 - function: sp_NewPostListAdmin,
The error also appears in line 448.
I was able to fix the error by adding a check before both loops:
if (isset($topic['posts'])) {
....
I hope my fix can be integrated in future versions.
greetings
Hi,
The error is generated to my knowledge when a post has been deleted. Here is a screenshot of a correct display:
The Forum title ("discussion libre") appears, but the next line ("Nettoyage de..") is blank and instead of "There is 1 new message"... there is "There is new message" with no digits.
Ah, yeah, I can see that maybe if a post is deleted before the admin has had a chance to review it how that might present an issue. The admin postbag queue might still contain a reference to the post. I'll add this as an issue in the issue tracker for a possible future fix.
Thanks for the report.
1 Guest(s)