Posted by Farreres on June 11, 2008 at 8:52am
Jump to:
| Project: | ImageCache Actions |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
* warning: imagefilter() expects exactly 3 parameters, 5 given in /modules/imagecache_actions/imagecache_coloractions.module on line 201.
* recoverable fatal error: Object of class stdClass could not be converted to string in /web/includes/bootstrap.inc on line 667.
* warning: preg_match() expects parameter 2 to be string, object given in /web/includes/bootstrap.inc on line 670.
* warning: preg_match() expects parameter 2 to be string, array given in web/includes/bootstrap.inc on line 670.
Comments
#1
I had the same error and solved it by replacing the following line of code in the imagecache_gd_imagefilter function in imagecache_coloractions.module
return imagefilter($image->res, $filter, $arg1, $arg2, $arg3);by
if (!is_null($arg2) && !is_null($arg3)) {return imagefilter($image->res, $filter, $arg1, $arg2, $arg3);
}
else if (!is_null($arg2) && is_null($arg3)) {
return imagefilter($image->res, $filter, $arg1, $arg2);
}
else if (is_null($arg2) && is_null($arg3)) {
return imagefilter($image->res, $filter, $arg1);
}
Thanks to Eaton which gave me the hint at http://drupal.org/node/212537.
#2
Thanks a lot for this fix. Shouldn't it be commited to main source ?
#3
Applied to 6-1-dev
May be backported one day.
#4