I am experiencing a number of errors in my syslog that may be pointing at vars.module. These messages always occur during cron runs.
Error 1: 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 '= 0' at line 1 query: SELECT name FROM system WHERE type = 'module' AND schema = 0 in /srv/www/htdocs/drupal6/sites/all/modules/vars/vars.module on line 537.
Error 2: array_fill(): Number of elements must be positive in /srv/www/htdocs/drupal6/includes/database.inc on line 252.
Error 3: implode(): Invalid arguments passed in /srv/www/htdocs/drupal6/includes/database.inc on line 252.
Error 4: 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 ')' at line 1 query: SELECT * FROM variable_default WHERE module IN () in /srv/www/htdocs/drupal6/sites/all/modules/vars/vars.module on line 545.
The line being referenced in the first error reported is as follows:
$query = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema = %d", SCHEMA_UNINSTALLED);
Any help would be appreciated.
Thank you,
-Matthew C Moss-
Comments
Comment #1
clkeenan commentedIm having this exact same problem. Did you find a fix?
Comment #2
clkeenan commentedChecking in to see if there is an update on this error
Comment #3
marcred commentedTry to change the word schema by schema_version (like it appears in the system table):
$query = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version = %d", SCHEMA_UNINSTALLED);Comment #4
Anonymous (not verified) commentedThe query doesn't use the correct field name, but the code should also check if there is any row matching the first query.