From f01ce862ec3acaab347153ed5e64037e381a90fb Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Sun, 21 Feb 2010 14:46:49 +0000 Subject: [PATCH] config-dist.php MDL-21603 - prevent php5 strict warnings with defualt config --- config-dist.php | 1 + install.php | 1 + 2 files changed, 2 insertions(+) diff --git a/config-dist.php b/config-dist.php index 4e77938b339..312e0f55ad4 100644 --- a/config-dist.php +++ b/config-dist.php @@ -28,6 +28,7 @@ // // /////////////////////////////////////////////////////////////////////////// unset($CFG); // Ignore this line +$CFG = new stdClass(); //========================================================================= // 1. DATABASE SETUP diff --git a/install.php b/install.php index 2318cb50e6c..be3c28c6f5e 100644 --- a/install.php +++ b/install.php @@ -533,6 +533,7 @@ if ($nextstage == SAVE) { $str .= 'unset($CFG);'."\r\n"; $str .= "\r\n"; + $str .= '$CFG = new stdClass();'."\r\n"; $str .= '$CFG->dbtype = \''.$INSTALL['dbtype']."';\r\n"; $str .= '$CFG->dbhost = \''.addslashes($INSTALL['dbhost'])."';\r\n"; if (!empty($INSTALL['dbname'])) {