]> git.mjollnir.org Git - moodle.git/commitdiff
Turn off strict XML headers during upgrade, so if an error occurrs, you are more...
authortjhunt <tjhunt>
Mon, 15 Sep 2008 04:21:15 +0000 (04:21 +0000)
committertjhunt <tjhunt>
Mon, 15 Sep 2008 04:21:15 +0000 (04:21 +0000)
admin/index.php

index 3953f24e4880bdeca40960737773b044273d7067..496b709a09f77a5d00015056a69b32c079992af3 100644 (file)
         $origdebug = $CFG->debug;
         $CFG->debug = DEBUG_MINIMAL;
         error_reporting($CFG->debug);
+        $CFG->xmlstrictheaders = false;
 
         // logo ut in case we are upgrading from pre 1.9 version in order to prevent
         // weird session/role problems caused by incorrect data in USER and SESSION
 
                 // Update core message providers
                 message_update_providers();
-               message_update_providers('message');
+                message_update_providers('message');
 
                 if (set_config("version", $version)) {
                     remove_dir($CFG->dataroot . '/cache', true); // flush cache
         }
     }
 
+    // Turn off xmlstrictheaders during upgrade.
+    $origxmlstrictheaders = !empty($CFG->xmlstrictheaders);
+    $CFG->xmlstrictheaders = false;
+
 /// Find and check all main modules and load them up or upgrade them if necessary
 /// first old *.php update and then the new upgrade.php script
     upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php");  // Return here afterwards
 
     unset($SESSION->installautopilot);
 
+    // Turn xmlstrictheaders back on now.
+    $CFG->xmlstrictheaders = $origxmlstrictheaders;
+
 /// Set up the blank site - to be customized later at the end of install.
     if (! $site = get_site()) {
         // We are about to create the site "course"