Closed (duplicate)
Project:
ImageCache
Version:
5.x-2.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2008 at 08:53 UTC
Updated:
28 Jun 2008 at 22:29 UTC
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
Comment #1
drewish commented#263058: Error in watchdog message