diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-30 01:05:16 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-30 01:05:16 +0000 |
commit | 466e5726850bd3e7aab1189ebd1d95a71b9b3458 (patch) | |
tree | c69e3912f67da72ab42e18e4b6ac722e99a888c2 /includes | |
parent | 4f8168c39ae7b97d00a749596c8774cfc82793ef (diff) | |
download | brdo-466e5726850bd3e7aab1189ebd1d95a71b9b3458.tar.gz brdo-466e5726850bd3e7aab1189ebd1d95a71b9b3458.tar.bz2 |
#337794 by Damien Tournoud: Make SimpleTest work under PosthreSQL again.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 4 | ||||
-rw-r--r-- | includes/common.inc | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 87f533806..59fb3f039 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -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); } } diff --git a/includes/common.inc b/includes/common.inc index 0256ac9ce..b6a55bc7a 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -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 |