Here is a error in the PHP code when trying to import images. The scenario to reproduce the error is:
- Put in /tmp/image image files with invalid extension (in my case its was .bmp).
- Select these files for import.
- Execute import.
The result is:
Image import
* warning: array_filter() [function.array-filter]: The first argument should be an array in /data/projects-sites/sites/all/modules/image/contrib/image_import/image_import.pages.inc on line 168.
* warning: Invalid argument supplied for foreach() in /data/projects-sites/sites/all/modules/image/contrib/image_import/image_import.pages.inc on line 168.
Import multiple image files and save them as image nodes. The files will be moved from their location into the image module's files directory. Searching for image files in /data/projects-sites/tmp/image.
Ivan Cenov
Comments
Comment #1
jwalkerbg commentedComment #2
mhhelle commentedIs this still a problem for you? I tried it with 6.x-1.x-dev as of today and could not reproduce with .jpg files that I renamed either with ".bmp" or ".xxx" extensions.
Comment #3
MatWho commentedStill a problem
Get :
Comment #4
joachim commentedHave you tried this with the current release rather than alpha 4?
Comment #5
joachim commented> # Select these files for import.
Er... PEBKAC? ;)
I've just tried this, and you actually *can't* select a BMP file for import -- it says "Not a JPG, GIF or PNG file." in the table.
However, I do get the same error when no files are selected. We should probably add a form validation handler to check *something* is selected. But really, you shouldn't press 'Import' until you've selected something and nothing bad happens -- hence this is going to be low down on my priority list.
Perhaps this could be a good one for a newbie to try patching -- good introduction to FormAPI probably.