Home ›
Error in module ImageApi
Hide all descriptions
Error description:
Error displayed when you use modules ImageApi, ImageCache
warning: Parameter 1 to imageapi_gd_image_resize() expected to be a reference, value given in .../modules/imageapi/imageapi.module on line 165
Cause of the problem in using PHP version 5.3
The solution is quite easy, although it will have to rewrite slightly module imageapi. To do this, open the folder with the module and open the file in the editor imageapi.module. Then go to line 163 where we see the following:
<?php
function imageapi_toolkit_invoke($method, &$image, array $params = array()) {
$function = $image->toolkit . '_image_' . $method;
if (function_exists($function)) {
array_unshift($params, $image);
return call_user_func_array($function, $params);
}
watchdog('imageapi', 'The selected image handling toolkit %toolkit can not correctly process %function.', array('%toolkit' => $image->toolkit, '%function' => $function), WATCHDOG_ERROR);
return FALSE;
}
?>Now this function, we need to slightly adjust the following:
<?php
function imageapi_toolkit_invoke($method, &$image, array $params = array()) {
$function = $image->toolkit . '_image_' . $method;
if (function_exists($function)) {
array_unshift($params, $image);
$params[0] = &$image;
return call_user_func_array($function, $params);
}
watchdog('imageapi', 'The selected image handling toolkit %toolkit can not correctly process %function.', array('%toolkit' => $image->toolkit, '%function' => $function), WATCHDOG_ERROR);
return FALSE;
}
?>Who's new
- Marat Farkhulin
Who's online
There are currently 0 users and 1 guest online.
Search
Work schedule
Feedback
Workdays
Monday to Friday
Working time
from 10 to 18 Moscow time, GMT +3
Break
from 13 to 14