Hello,
I get this warning when I save a node:
* warning: Parameter 1 to imageapi_image_crop() expected to be a reference, value given in /home/xxxxx/public_html/includes/module.inc on line 462.
*warning: Parameter 1 to imageapi_image_scale_and_crop() expected to be a reference, value given in /home/xxxxx/public_html/includes/module.inc on line 462.
Also, image is not cropped (page is showing the original image). This started to happen when i changed my ISP. They are using php 5.3 - previous ISP used 5.2.
I'm not sure if this is ImageAPI or Imagefield Crop issue, but it only happens when I try to use cropped image in a node.
I'm using the latest Imagefield Crop dev (6.x-1.x-dev 2010-May-12).
Drupal 6.16
Access to update.php Protected
CTools CSS Cache Exists
Configuration file Protected
Cron maintenance tasks Last run 2 hours 54 min ago
Database updates Up to date
Drupal core update status Up to date
File system Writable (public download method)
GD library bundled (2.0.34 compatible)
Module and theme update status Up to date
MySQL database 5.1.44
PHP 5.3.2
PHP memory limit 256M
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | imagefield_crop_widget-php53.patch | 1018 bytes | edsko |
Comments
Comment #1
edsko commentedI am having the same issue. Attached is a patch that fixes it, but I'm not sure this is the best way to do it; it changes calls of the form
module_invoke('imageapi', 'image_crop', $image, $crop['x'], $crop['y'], $crop['width'], $crop['height'])
to calls of the form
imageapi_image_scale_and_crop($image, $scale['width'], $scale['height'])
This fixes the problem because for some reason when going through module_invoke the image is passed by value, not by reference. Not sure that there is a better way to do it though.
Comment #2
Yorgg commentedI have downgraded to 5.2 anyway this patch worked for me in 5.3.
Comment #3
yhager commentedThanks, committed.
@staminna: I can hardly see how the patch related to your issue. Please double check and open another issue if this is still relevant.