I tried uploading a zip file with images on my local computer, and it gave me this bug:

mt_rand() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\drupal-5.0-beta2\modules\acidfree\acidfree.module on line 1314.

I've got drupal-5.0-beta2, and acidfree-HEAD, and I'm running on PHP 5.1.6 / MySQL 5.0.24a (apachefriends).

Comments

bradlis7’s picture

Title: mt_rand expects 2 parameters » mt_rand Expects 2 Parameters

Also here's an error when I go to album/1/edit:

Fatal error: Call to undefined function _image_get_dimensions() in C:\xampp\htdocs\drupal-5.0-beta2\modules\acidfree\acidfree.module on line 2250

And when I try to import an image:

file 02270009.jpg is not a valid acidfree element type (image/jpeg)

Sorry if they should be seperate issues, but the second one may be involved somehow.

bradlis7’s picture

The only function I've found that has _image_get_dimensions, according to google, is in the image.module. If this is true, then a dependancy for image.module needs to be added.

I'm working on a patch for the other problems.

bradlis7’s picture

Yeah, the image.module fixed the undefined function call; but when I try to do a mass import of a jpg file, it still says not a valid acidfree element. And importing a zipped file of jpg's doesn't import anything.

I think calling mt_rand() w/o anything in it would do what you want, but I could be wrong. I don't think acidfree is quite what I'm looking for though, so I won't be doing the patch.

vhmauery’s picture

Status: Active » Fixed

_image_get_dimensions will soon be removed from acidfree.module. Acidfree only requires Taxonomy and Views. To upgrade from 4.7 requires more.

The mt_rand fix is committed.

As for the 'not an Acidfree type' errors, it sounds like you didn't have Image module enabled, which meant that $acidfree_types did not get populated with the image class and mime info, so jpegs really weren't an acidfree type. I need to fix the enable/disable modules thing so it can update acidfree_types.

vhmauery’s picture

Status: Fixed » Closed (fixed)