Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With SQLite3, when I add an environment I get this error :
PDOException: SQLSTATE[HY000]: General error: 25 bind or column index out of range: SELECT COUNT(*) FROM {environment_indicator_environment} WHERE machine = ':machine'; Array ( [:machine] => demo ) in environment_indicator_machine_available() (line 269 of /var/www/drupal/sites/all/modules/contrib/environment_indicator/environment_indicator.module).
To correct it I have to remove quotes :
function environment_indicator_machine_available($machine) {
return db_query("SELECT COUNT(*) FROM {environment_indicator_environment} WHERE machine = ':machine'", array(':machine' => $machine))->fetchField() > 0 && $machine != 'overwritten_environment';
}
becomes :
function environment_indicator_machine_available($machine) {
return db_query("SELECT COUNT(*) FROM {environment_indicator_environment} WHERE machine = :machine", array(':machine' => $machine))->fetchField() > 0 && $machine != 'overwritten_environment';
}