Hi

Since I've updated a ubercart drupal based shop to imagecache2 i was getting this error at some "random" points:

warning: preg_match() expects parameter 2 to be string, array given in bootstrap.inc on line 670.

I thought it was a ubercart incompatibility issue, so I've opened a thread for this in ubercart: http://drupal.org/node/273726 but finally found the error in the imagecache 2 module

This code, on 349 line of imagecache.module file

watchdog('imagecache', t('Failed generating an image from %image using imagecache preset %preset.', array('%image' => $path, '%preset' => $preset)), WATCHDOG_ERROR);

Should be replaced for this other one:

watchdog('imagecache', t('Failed generating an image from %image using imagecache preset %preset.', array('%image' => $path, '%preset' => $presetname)), WATCHDOG_ERROR);

If you pass the complete $preset array throught watchdog, "sometimes" an error raises because check_plain get an array instead of a string.

Hope this helps!

Comments

drewish’s picture

Status: Active » Closed (duplicate)