Hello ,

There are some major problems with image.module . The problems outlined below were replicated on two independent
websites

Both independent sites fall over when we preview/submit an image with the following errors

warning: Invalid argument supplied for foreach() in /var/www/html/ ... /image/image.module on line 316.

warning: Invalid argument supplied for foreach() in /web/sites/...../modules/image/image.module on line 316.

However with error reporting turned off the image.module will work but has a usabilty problem in that it allows you submit without selecting an image .

Currently deploying the latest drupal build 4.6.3 on both websites and a recent image.module from the contributed repository on drupal.org

-Paul

Comments

Bèr Kessels’s picture

Category: bug » support
Priority: Critical » Normal

you should NOT (never) run CVS/head module on a 4.6.2 installtion. Use a 4.6 module for 4.6 Drupal.
PLease close this issue if that fixed your problem.

Anonymous’s picture

Version: » 4.6.x-1.x-dev

Sorry. The above version was set incorrectly that should have been 4.6.0 i guess ,
although iam currently using 4.6.3 .

Regards
Paul

MrMattles’s picture

I am having this same issue

Ken Collins’s picture

Category: support » bug
Priority: Normal » Critical

I am seeing this error too:

warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents-MetaSkills-465/modules/image/image.module on line 315.
warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents-MetaSkills-465/includes/common.inc:384) in /Library/WebServer/Documents-MetaSkills-465/includes/common.inc on line 192.

This is on image.module version

// $Id: image.module,v 1.146.2.8 2005/08/02 23:02:13 walkah Exp $

Thing is... that this problem started showing up after I saw this error

Fatal error: mime_magic could not be initialized, magic file is not avaliable in /Library/WebServer/Documents-MetaSkills-465/includes/file.inc on line 149

I am using the new Drupal 4.6.3 and the file.inc version is

// $Id: file.inc,v 1.39.2.11 2005-12-12 11:37:31 dries Exp $
Ken Collins’s picture

Priority: Critical » Minor

OK, I resolved this on my end (1) upgrading to the lates version of image and (2) adding this to my php.ini file. This command let my PHP4 know where my Apache2 magic file was.

[mime_magic]
mime_magic.magicfile = "/Library/Apache2/conf/magic"

drewish’s picture

Status: Active » Closed (fixed)

This version is no longer supported. If this issue is occurring with a more recent version please open a new issue.