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 |
Jump to:
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
| Attachment | Size |
|---|---|
| chameleon_comment.patch | 1.35 KB |

#1
#2
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
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
Automatically closed -- issue fixed for two weeks with no activity.