Fatal error, warning, and notice, in chameleon_comment()

John Morahan - October 25, 2007 - 07:54
Project:Drupal
Version:6.x-dev
Component:theme system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Create a node, add a comment, switch to the chameleon theme, and try to view the node. Result: "Fatal error: Unsupported operand types in /.../includes/common.inc on line 1387"
Fix that, and you get these:
* notice: Undefined variable: signature in /.../themes/chameleon/chameleon.theme on line 163.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /.../themes/chameleon/chameleon.theme on line 170.
Attached patch fixes all the above

AttachmentSize
chameleon_comment.patch1.35 KB

#1

John Morahan - October 25, 2007 - 07:55
Status:active» needs review

#2

catch - October 25, 2007 - 10:06
Status:needs review» reviewed & tested by the community

Tested with and without patch, gets rid of the error and the fix looks sensible (although I have no idea about non-phptemplate themes in general).

#3

Gábor Hojtsy - October 25, 2007 - 10:37
Status:reviewed & tested by the community» fixed

Indeed, theme_comment parameters are not properly used here (as defined in comment_theme() in comment.module).

  'comment' => array(                                                                               
      'template' => 'comment',                                                                        
      'arguments' => array('comment' => NULL, 'node' => NULL, 'links' => array()),                    
    ),

So adding the node between the comment and the links seems to be correct.

l() was also changed to have l($text, $path, $options = array()) so that fix also look correct.

Then what remains is an E_ALL fix, so committed.

Thanks for the patch!

#4

Anonymous - November 12, 2007 - 22:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.