Index: drupal/modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.559
diff -u -p -r1.559 system.module
--- drupal/modules/system/system.module	6 Dec 2007 09:58:33 -0000	1.559
+++ drupal/modules/system/system.module	7 Dec 2007 19:37:35 -0000
@@ -1113,7 +1113,7 @@ function system_cron() {
   db_query('DELETE FROM {batch} WHERE timestamp < %d', time() - 864000);
 
   // Remove temporary files that are older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
-  $result = db_query('SELECT * FROM {files} WHERE status = %s and timestamp < %d', FILE_STATUS_TEMPORARY, time() - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
+  $result = db_query('SELECT * FROM {files} WHERE status = %d and timestamp < %d', FILE_STATUS_TEMPORARY, time() - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
   while ($file = db_fetch_object($result)) {
     if (file_exists($file->filepath)) {
       // If files that exist cannot be deleted, continue so the database remains
