Community & Support

common.inc file brings up unsupported operand types fatal error

Most things are working fine after upgrading from D5 to D6 but a few pages are giving me this error

Fatal error: Unsupported operand types in /home3/site/public_html/includes/common.inc on line 1582

I've seen a few posts from D5 but nothing recent and nothing with the same line. Any thoughts?
Thanks.

Comments

I'm also having the same

I'm also having the same problem. It seems to be caused by different problems. For example when I use a non-existent URL instead of Error 404 page I get fatal error in line 1582.

...help Drupal grow, whatever you do matters.

Hello,
I am having the same issue here, but not after an update. I am just using Drupal 6.

Fatal error: Unsupported operand types in *myserver*/includes/common.inc on line 1582

It happens while using the nodecomment module. When I drop the node-comment.tpl.php into the theme folder or any other node-mytype.tpl.php file, there's that error, when I try surf to any node. When I delete those node-mytype.tpl.php files from the theme folder again, the error is no more...

are you guys also using the nodecomment module?

rgds,

Remove the error

I had the same problem also using nodecomment. After careful inspection I found that there is an error in the tpl, the arguments passed to the l()-function are structured like they should for version > 6, as the specification of that function has changed.

Replace the l()-function with this to fix the problem:

<?php
l
($node->title, $_GET['q'], array('fragment' => "comment-$node->nid"))
?>

Recent Blocks

Hi guys - my site was running fine in D6 until I installed the Recent Blocks module and activated one of the blocks. Then I suddenly got the same error you're listing above. Connected?

I'm not using the recent

I'm not using the recent blocks module or the node comments module. This problem happens when I try to go to a "page" that was created when the site was on D5. Other pages work fine.

I'm not using the recent

I'm not using the recent blocks module or the node comments module. This problem happens when I try to go to a "page" that was created when the site was on D5. Other pages work fine.

I just tried recreating the

I just tried recreating the page that gives me the error. It was a "book" page. I deleted it and tried recreating it but the error is still there.

same problem. I get the

same problem. I get the message when previewing a node, in which I added a freefield tag. Saving the node gives no problem, but when previewing I get this error???

Web Developer at Dutch Open Projects

Which Version

So let's see which version of Drupal we use, for me seems that it is a problem connected to the way the core handles certain modules...

I use Drupal core 6.14

PS. here's somebody else that had that problem with a RC og Drupal 6: http://drupal.org/node/607286 (Any pro has an idea?)

core 6.14. The bit of code

core 6.14. The bit of code the error refers to deals with the link structure. I'm guessing that when I upgraded from D5 to D6 some link alias got messed up somehow

1572    * @return
1573     *   an HTML string containing a link to the given path.
1574     */
1575    function l($text, $path, $options = array()) {
1576      global $language;
1577
1578      // Merge in defaults.
1579      $options += array(
1580          'attributes' => array(),
1581          'html' => FALSE,
1582       );

I found this which might help. http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x

Ditto. Problem popped up a

Ditto. Problem popped up a few days ago and is driving me crazy. Using Drupal core 6.15. When I enter keywords into page title, click save, I get, "Unsupported operand types in /home/content/m/a/r/markcissi/html/includes/common.inc on line 1416". I have been searching Drupal, Google, etc and am no further along. Thoughts, ideas? Much appreciated.

Same Error: was caused by /Menu Icons/ module.

Fatal error: Unsupported operand types in /var/www/includes/common.inc on line 1582

I'm using drupal 6.14, and recently installed menu-icons-6.x.2-0, and got the same error (only when accessing the homepage of my site, all other pager appeared fine.)
Disabling the menu-icons module restored everything back to normal.

-Jitender Pal Singh.

Did you disable and uninstall

Did you disable and uninstall the menu icons module? Make sure its wiped from your database and then reinstall it. I know the menu icons module works fine because I use it. I think the error is caused by the module path getting screwed up in the database. Make sure all system modules are in the /modules directory and other modules are in the /sites/all/modules directory. If the error comes up check the path in the database. I got rid of that error after removing all non system modules and reinstalling them. Really I just needed to check the path to in the DB.

another solution

Hello , I did make some change to a node php snippet and I added the option $html = TRUE to the function l($text, $href) as I wanted to display an image url inside the link

I couldn t access my website admin anymore as I always got the same error message described here.
None of the solution here worked for me so I decided to comment the part of the code on common.inc that made Drupal crashed :

$options += array(
      'attributes' => array(),
      'html' => FALSE,
    );

and another one in the url function ( sorry forgot which one but it also concern $options array , you ll probably see it by debugging.

Finally the error disappear and I reversed the change I made on the php snippet in the block.

I hope it helps, O and don t try to add that argument into l() function like that , it goes into $attribute array that was my mistake.