You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, we've caught a bug related to Spam Hurdles module. I was able to reproduce it at different Phorum setups even at a newly clean one.
We are on
Phorum 5.2.19,
Spam Hurdles 2.0.2.
(nginx 1.2.4
PHP 5.3.21
MySQL 5.1.67)
Okay, if we turn on spam hurdles with default settings and approve "Enable Caching Messages" in Cache Settings here is what happens. Let's say a user posts a new topic message, which is sent to moderation by the Spam Hurdles module.
Then if a moderator goes to that new topic message, there is a number of warnings popping up like those:
Notice: Undefined index: message_ids in [phorum_dir]/read.php on line 270
Warning: sort() expects parameter 1 to be array, null given in [phorum_dir]/read.php on line 276
Warning: array_slice() expects parameter 1 to be array, null given in [phorum_dir]/read.php on line 305
Warning: Invalid argument supplied for foreach() in [phorum_dir]/read.php on line 325
The reason for those warnings is a PHP code block related to cache regime for the message.
It tries to read data from cache represented by phorum_messages.meta field. It expects either message_ids or message_ids_moderator but it's empty in that field. It gets null instead of an array. And after trying to apply array operations to a null value we get abeforementioned warnings.
If caching messages is turned off moderator doesn't see the warnings. Because message data is read and rebuild from database and everything goes well.
This problem doesn't bother much. It can be deflected by suppressing errors. But anyway this shouldn't be the way the code logic is organized.
Please comment on this issue and possibly provide a solution vector.
Well, we've caught a bug related to Spam Hurdles module. I was able to reproduce it at different Phorum setups even at a newly clean one.
I tried to figure out the problem, but I wasn't able to reproduce it.
I think you have a problem with serialize/unserialize the meta column. "message_ids" is stored as serialized data in this field and the "message_ids" value is always included. It shouldn't be possible that "message_ids" is missing.
Is it possible, that you make some more tests? Please contact me via PM.
Well, we've caught a bug related to Spam Hurdles module. I was able to reproduce it at different Phorum setups even at a newly clean one.
We are on
Phorum 5.2.19,
Spam Hurdles 2.0.2.
(nginx 1.2.4
PHP 5.3.21
MySQL 5.1.67)
Okay, if we turn on spam hurdles with default settings and approve "Enable Caching Messages" in Cache Settings here is what happens. Let's say a user posts a new topic message, which is sent to moderation by the Spam Hurdles module.
Then if a moderator goes to that new topic message, there is a number of warnings popping up like those:
The reason for those warnings is a PHP code block related to cache regime for the message.
It tries to read data from cache represented by phorum_messages.meta field. It expects either message_ids or message_ids_moderator but it's empty in that field. It gets null instead of an array. And after trying to apply array operations to a null value we get abeforementioned warnings.
If caching messages is turned off moderator doesn't see the warnings. Because message data is read and rebuild from database and everything goes well.
This problem doesn't bother much. It can be deflected by suppressing errors. But anyway this shouldn't be the way the code logic is organized.
Please comment on this issue and possibly provide a solution vector.
Best wishes!
P. S.
Also posted it here:
http://www.phorum.org/phorum5/read.php?62,141836,155098,page=5#msg-155098
The text was updated successfully, but these errors were encountered: