MDL-19711 dml: Fix undefined $dberr
authorSrdjan <srdjan@catalyst.net.nz>
Tue, 19 May 2020 06:21:48 +0000 (16:21 +1000)
committerSrdjan <srdjan@catalyst.net.nz>
Tue, 19 May 2020 07:02:05 +0000 (17:02 +1000)
In mysqli_native_moodle_database::raw_connect()

lib/dml/mysqli_native_moodle_database.php

index 80dc020..50b76ef 100644 (file)
@@ -567,6 +567,7 @@ class mysqli_native_moodle_database extends moodle_database {
         }
 
         $conn = null;
+        $dberr = null;
         try {
             $conn = $this->mysqli->real_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbsocket);
         } catch (\Exception $e) {