[agora] "Undefined index" when approving posts in a moderated forums

Ben Klang ben at alkaloid.net
Mon Jan 16 08:27:33 PST 2006


Hello List,

I have recently come across a bug in Agora.  After creating a moderated forum, 
I created a new post and attempted to moderate/approve the message.  This 
results in the following message:

Notice: Undefined index: message_last_message in agora/lib/Messages.php on 
line 1152
 
 Notice: Undefined index: message_last_timestamp in agora/lib/Messages.php on 
line 1155
 
 Notice: Undefined index: message_last_author in agora/lib/Messages.php on 
line 1158
 
 Warning: Cannot modify header information - headers already sent by (output 
started at agora/lib/Messages.php:1152) in agora/messages/edit.php on line 86


The problem only occurs in moderated forums and only on the first message of a 
new thread.  The "easy" solution I came up with is to "mute" the errors with 
an "@" on assignment like this:

agora/lib/Messages.php line 1162:
'value' => @$this->data['message_timestamp']);

But this feels dirty to me.  Is there a better way to handle this error?

Thanks,
/BAK/


More information about the agora mailing list