Closed (duplicate)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Feb 2009 at 14:11 UTC
Updated:
27 Feb 2009 at 18:23 UTC
Jump to comment: Most recent file
Patch checks if the field is empty before foreach().
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | filefield_field.inc_.patch | 497 bytes | q0rban |
| filefield_php_notice_node_update.patch | 859 bytes | amitaibu |
Comments
Comment #1
q0rban commentedSo, to explain this a bit further, basically filefield looks for deleted files on a node that didn't have any files to begin with. So you get errors on the foreach on line 124 since $orig->$field['field_name'] is not an array.
Comment #2
q0rban commentedComment #3
dopry commentedComment #4
amitaibuI think that the
if !emptyis more standard then casting to(array).Comment #5
quicksketchFixed in #369310: Invalid argument supplied for foreach() when updating nodes.