When I view a Brilliant Gallery page, a watchdog error is logged:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1242847016 SET data = 'cache', created = 1242587816, expire = 0, headers = '', s' at line 1 query: UPDATE 1242847016 SET data = 'cache', created = 1242587816, expire = 0, headers = '', serialized = 0 WHERE cid = 'bg_ba3f26cd8dd360c4a26d8602be1fb573' in /var/www/lvs/includes/cache.inc on line 109.
CommentFileSizeAuthor
#1 465364-1.patch813 bytesMark B

Comments

Mark B’s picture

StatusFileSize
new813 bytes

This is due to the call to cache_set in image.php having the wrong parameters:

      # For some reason I could not use: mysql_escape_string($my_data)
      cache_set($bgcacheid, 'cache', time() + $bgcachexpire, $my_data);
      # FOR DRUPAL6 MUST USE:
      #cache_set($bgcacheid,  $my_data, time() + $bgcachexpire); # For some reason I could not use: mysql_escape_string($my_data)

So the first problem is that this version of image.php with the v6.x-3.0 module has the Drupal 6 call to cache_set commented out. However, the second problem is that the Drupal 6 call to cache_set also has the wrong parameter list!

The correct call is

cache_set($bgcacheid, $my_data, 'cache', time() + $bgcachexpire);
Mark B’s picture

Status: Active » Needs review
Panthrax’s picture

Patch works! Thanks!

Status: needs review » reviewed & tested by the community?

rogb’s picture

Patch works for me too