]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11694 adding error displaying into installer, it does not affect the debug and...
authorskodak <skodak>
Wed, 10 Oct 2007 11:03:00 +0000 (11:03 +0000)
committerskodak <skodak>
Wed, 10 Oct 2007 11:03:00 +0000 (11:03 +0000)
MDL-11432 eliminated RecordCount

install.php

index 76157e04734e730eeb3100f153902beeec50ee09..a7e268caaf2153a603e9df50b2eff3847ee17b1e 100644 (file)
@@ -33,6 +33,10 @@ define('SITEID', 0);
 session_name('MoodleSession');
 @session_start();
 
+/// make sure PHP errors are displayed to help diagnose problems
+@error_reporting(1023); //E_ALL not used because we do not want strict notices in PHP5 yet
+@ini_set('display_errors', '1');
+
 if (! isset($_SESSION['INSTALL'])) {
     $_SESSION['INSTALL'] = array();
 }
@@ -369,7 +373,7 @@ if ($INSTALL['stage'] == DATABASE) {
                 case 'mysqli':
                 /// Get MySQL character_set_database value
                     $rs = $db->Execute("SHOW VARIABLES LIKE 'character_set_database'");
-                    if ($rs && $rs->RecordCount() > 0) {
+                    if ($rs && !$rs->EOF) {
                         $records = $rs->GetAssoc(true);
                         $encoding = $records['character_set_database']['Value'];
                         if (strtoupper($encoding) != 'UTF8') {