--- template.theme-registry.inc.orig	2010-06-02 16:48:07.000000000 +0200
+++ template.theme-registry.inc	2010-06-02 16:47:01.000000000 +0200
@@ -53,7 +53,10 @@ function zen_theme_get_default_settings(
     // Merge the defaults with the theme settings saved in the database.
     $settings = array_merge($defaults, variable_get('theme_'. $theme .'_settings', array()));
     // Save the settings back to the database.
-    variable_set('theme_'. $theme .'_settings', $settings);
+    if(db_is_active())
+    {
+      variable_set('theme_'. $theme .'_settings', $settings);
+    }
     // If the active theme has been loaded, force refresh of Drupal internals.
     if (!empty($GLOBALS['theme_key'])) {
       theme_get_setting('', TRUE);
