* 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

dvgm’s picture

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.

Countzero’s picture

Thanks a lot for this fix. Shouldn't it be commited to main source ?

dman’s picture

Status: Active » Patch (to be ported)

Applied to 6-1-dev
May be backported one day.

dman’s picture

Status: Patch (to be ported) » Closed (fixed)