Using PHP 5.2.6.

On attempting to create a custom content field I got:

Fatal error: Cannot use object of type stdClass as array in cck/includes/content.crud.inc on line 377

After researching this I was able to fix this with the attached patch.

-  unset($field['db_columns']);
+  unset($field->db_columns);

I have no way of testing whether this works for PHP4 though.

CommentFileSizeAuthor
php5-object-SP20080511-00.patch466 bytessamirnassar

Comments

dropcube’s picture

Priority: Critical » Normal
Status: Needs review » Postponed (maintainer needs more info)

$field is an array. not an object.
I can not reproduce the bug. Could you please provide more information, what kind of field you were adding, etc..

samirnassar’s picture

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

I cannot reproduce the bug myself anymore. Therefore I am closing this as there is nothing that needs fixing.