Closed (fixed)
Project:
File (Field) Paths
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Nov 2008 at 18:08 UTC
Updated:
10 Nov 2008 at 05:19 UTC
Basically when you submit a node without any filefield or imagefield additions or changes, there won't be entries added into $ffp as the "!empty($file['data']['process']" condition never hits.
So you get warnings like:
* warning: Invalid argument supplied for foreach() in /var/www/html/drupal/drupal-6.6/sites/all/modules/filefield_paths/filefield_paths.module on line 284.
* warning: Invalid argument supplied for foreach() in /var/www/html/drupal/drupal-6.6/sites/all/modules/filefield_paths/filefield_paths.module on line 296.
Included patch just wraps that section with:
if (is_array($ffp['#types'])) {
...
}
| Comment | File | Size | Author |
|---|---|---|---|
| filefield-paths-non-array.patch | 1.72 KB | Moonshine |
Comments
Comment #1
decipheredCheers moonshine, can chalk that one up to lack of testing; tested some weird use cases, but that's one that obviously didn't occur to me.
Will review the issue/patch shortly.
Comment #2
decipheredIssue and fix confirmed, I modified it slightly and it has been committed to HEAD and DRUPAL-5.
Thanks for the testing :)
Comment #3
deciphered