Commit 466e5726 authored by webchick's avatar webchick

#337794 by Damien Tournoud: Make SimpleTest work under PosthreSQL again.

parent 4f8168c3
......@@ -1368,7 +1368,9 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
drupal_alter('schema', $schema);
}
if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) {
// If the schema is empty, avoid saving it: some database engines require
// the schema to perform queries, and this could lead to infinite loops.
if (!empty($schema) && (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL)) {
cache_set('schema', $schema);
}
}
......
......@@ -947,7 +947,7 @@ function t($string, $args = array(), $langcode = NULL) {
static $custom_strings;
if (!isset($langcode)) {
$langcode = $language->language;
$langcode = isset($language->language) ? $language->language : 'en';
}
// First, check for an array of customized strings. If present, use the array
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment