Fatal error: Cannot use object of type stdClass as array in /home/moonray/wwwroot/drupal/modules/nodewords/nodewords.module on line 308

I believe it might have something to do with the Categories module replacing the taxonomy module with one of its own.

Comments

moonray’s picture

I actually found the same error in the images_upload module.
It has to do with the code expecting submitted form data, but instead the node is being loaded from code, and then saved (after some modifications to title) using code. So, instead of an array, the function receives an StdClass... will look into submitting a patch when I work out the best way to do this.

Robrecht Jacques’s picture

Well, then that's a bug in category module. It shouldn't mess with peoples expectations :-)

But I don't mind adding a (array) (which converts the object in an array - I believe that's all there is to it) somewhere. If you could tell me where...

Robrecht Jacques’s picture

Duh! The "where" is obviously line 308... will check it (but a patch is appreciated anyhow).

Robrecht Jacques’s picture

Could you tell me a bit more about this, because I can't seem to reproduce:

1. install nodewords and category
2. enable the wrapper for taxonomy and book (admniister >> settings >> category)
3. add container with some categories, required for "page"
4. create page, assign some categories
5. delete page => no error

Even if i use that container as auto-keywords vocabulary, nothing "bad" happens when i delete the node.

And what's even stranger: line 308 just contains the line $form = array(); and I doubt there is any error there.

So please let me know something (eg steps to reproduce).

Robrecht Jacques’s picture

Status: Active » Postponed (maintainer needs more info)

This needs more information as asked before I'll be able to fix this.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I am closing this report because it didn't get any feedback in more than one year; this is enought to think that who opened the report has lost interest in it.