Band-Aided user_homepage undefined index error in comments.
authorDan
Wed, 13 May 2009 09:46:54 -0400
changeset 972 437f2505d340
parent 971 bc8f3ab74e5e
child 973 451141c834fe
Band-Aided user_homepage undefined index error in comments.
includes/comment.php
--- a/includes/comment.php	Wed May 13 09:44:46 2009 -0400
+++ b/includes/comment.php	Wed May 13 09:46:54 2009 -0400
@@ -281,7 +281,7 @@
         $spam_policy = getConfig('comment_spam_policy', 'moderate');
         $sc_name = ( $session->user_logged_in ) ? $session->username : $data['name'];
         $sc_mail = ( $session->user_logged_in ) ? $session->email : false;
-        $sc_url  = ( $session->user_logged_in ) ? $session->user_extra['user_homepage'] : false;
+        $sc_url  = ( $session->user_logged_in ) ? @$session->user_extra['user_homepage'] : false;
         $spamcheck = $spam_policy === 'accept' ? true : spamalyze($data['text'], $sc_name, $sc_mail, $sc_url);
         if ( !$spamcheck && $spam_policy === 'reject' )
         {