Posted by Moonshine on November 7, 2008 at 6:08pm
Jump to:
| Project: | File (Field) Paths |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Moonshine |
| Status: | closed (fixed) |
Issue Summary
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:
<?php
if (is_array($ffp['#types'])) {
...
}
?>| Attachment | Size |
|---|---|
| filefield-paths-non-array.patch | 1.72 KB |
Comments
#1
Cheers 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.
#2
Issue and fix confirmed, I modified it slightly and it has been committed to HEAD and DRUPAL-5.
Thanks for the testing :)
#3