summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-11-30 01:05:16 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-11-30 01:05:16 +0000
commit466e5726850bd3e7aab1189ebd1d95a71b9b3458 (patch)
treec69e3912f67da72ab42e18e4b6ac722e99a888c2 /includes
parent4f8168c39ae7b97d00a749596c8774cfc82793ef (diff)
downloadbrdo-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.inc4
-rw-r--r--includes/common.inc2
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