Closed (fixed)
Project:
EPSA Crop - Image Cropping
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2011 at 00:42 UTC
Updated:
28 Sep 2011 at 17:41 UTC
When using other modules utilizing imagefield such as LinkImageField, you get a nasty error because:
function _epsacrop_get_crop_presets() {
$actions = _epsacrop_get_crop_actions();
$presets = array();
foreach ($actions as $preset) {
$presets[$preset['presetname']] = $preset['presetname'];
}
return $presets;
}
tries looping through a variable which isn't an array. This is because epsacrop doesn't (currently) detect these other fields and no action presets exist.
The attached patch fixes this by simply checking if $presets is not empty, and is an array before looping.
| Comment | File | Size | Author |
|---|---|---|---|
| epsacrop_expecting_array.patch | 930 bytes | tseven |
Comments
Comment #1
tseven commentedI just submitted a patch which should allow epsacrop to work with other modules.
Comment #2
yvmarques commentedHi,
Thanks for the patch, it's now commited in 1.x-dev :)
-- Yvan
Comment #3
yvmarques commented