Closed (fixed)
Project:
Node Comments
Version:
6.x-1.2-rc2
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2009 at 23:19 UTC
Updated:
9 May 2010 at 19:09 UTC
Hi,
when adding this file to my theme (garland or my own) I get the following error message when viewing the created comment:
Fatal error: Unsupported operand types in /includes/common.inc on line 1586
when removing this line it works but than I would like to know what is wrong with this line and how to fix it to work properly.
print l($node->title, $_GET['q'], NULL, NULL, "comment-$node->nid") . ' ' . theme('mark', $node->new); Thank you!
Comments
Comment #1
dopedwizard commentedAs for what I could find out on the net, it seems to be something with old and new code.
When adding the "dirty trick" from this page ( I only added the second part, because adding the first part of the fix would also result in a different error message)
http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x
First, you can just make things work
Here's what it'll take to make the errors go away. I wouldn't suggest using this method unless you're bypassing an error in a module you didn't write, and you don't really feel like hacking around in it to fix things. Simply drop these two snippets into drupal/includes/common.inc.
Your code should work exactly as intended. Note that this method is a dirty hack, but will get the job done (i.e. treat the symptoms). Don't come crying to me when something breaks later, because I'm warning you now.
It worked, but obviously this is not the way to go in the long-run.
Comment #2
dopedwizard commentedIssue with the "stable" download, if you copy the file from the dev version it works.
Comment #3
crea commentedD6 1.x branch is not supported anymore. Closing.