]> git.mjollnir.org Git - moodle.git/commitdiff
Turn off PHP error reporting while connecting to database
authormoodler <moodler>
Wed, 7 May 2003 08:07:48 +0000 (08:07 +0000)
committermoodler <moodler>
Wed, 7 May 2003 08:07:48 +0000 (08:07 +0000)
lib/setup.php

index da5f28dfd31aceae399b867e4a5d0b45811d9d03..134c774ce4ad82b86f733944631ceb783b8fc80e 100644 (file)
@@ -21,6 +21,7 @@
 
     $db = &ADONewConnection($CFG->dbtype);         
 
+    error_reporting(0);  // Hide errors 
     // Try a persistent connection first, but if it fails, fall back to ordinary connection
     if (! $db->PConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname)) {
         if (! $db->Connect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname)) {
         }
     }
 
+    error_reporting(E_ALL);       // Show errors from now on.
+
     if (!isset($CFG->prefix)) {   // Just in case it isn't defined in config.php
         $CFG->prefix = "";
     }
-    //$CFG->prefix = "$CFG->dbname.$CFG->prefix";
 
 
 /// Define admin directory