Closed (outdated)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.9
Component:
content.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2011 at 14:50 UTC
Updated:
21 Apr 2016 at 15:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
-enzo- commentedTypo the line is 1248
Comment #2
dagmarhttp://drupal.org/coding-standards#indenting Use two spaces instead of tabs.
http://drupal.org/coding-standards#controlstruct use {} in control structures. Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls.
http://drupal.org/coding-standards#concat Always use a space between the dot and the concatenated parts to improve readability.
And from http://drupal.org/node/34341 use !empty() instead of isset()
So, the code should be:
Comment #3
Gemma Morton commentedIv rolled the patch to use whats shown in #2.
Is this going to be accepted?
Comment #4
Gemma Morton commentedMe again,
It seems the Addresses module sends the following array to _content_field_invoke for $items:
Whilst the code expects an Array, this is throwing numerous errors on my site (and thus I am sure others)
So, Iv just changed the patch to first check if it is an Array, before unsetting $items[_add more]
I realise that at the end of this day, this is something that Addresses should check, but its probably a good idea for CCK to make sure its checking an array, before it trys to do anything to it. I hope this is ok.
Comment #5
Gemma Morton commentedIgnore my comments.
In your code, you should run
node_object_prepare($node);
before
node_save($node);
and then you shouldnt receive this error.
Comment #6
jessia commentedWhen I try to apply this patch, I get the error:
patching file content.module
patch: **** malformed patch at line 15:
-Jessi
Comment #7
ludo.rI have the same issue on line 1248.
It may be linked to this issue : http://drupal.org/node/1077798
Comment #8
kenorb commentedClosed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.