Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Deciphered CreditAttribution: Deciphered commentedCheers 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
Deciphered CreditAttribution: Deciphered commentedIssue and fix confirmed, I modified it slightly and it has been committed to HEAD and DRUPAL-5.
Thanks for the testing :)
Comment #3
Deciphered CreditAttribution: Deciphered commented