diff --git a/lib/dml/mssql_native_moodle_database.php b/lib/dml/mssql_native_moodle_database.php index cc682e5cb82..f45d05ee4da 100644 --- a/lib/dml/mssql_native_moodle_database.php +++ b/lib/dml/mssql_native_moodle_database.php @@ -327,7 +327,7 @@ class mssql_native_moodle_database extends moodle_database { if ($result) { while ($row = mssql_fetch_row($result)) { $tablename = reset($row); - if ($this->prefix !== '') { + if ($this->prefix !== false && $this->prefix !== '') { if (strpos($tablename, $this->prefix) !== 0) { continue; } diff --git a/lib/dml/oci_native_moodle_database.php b/lib/dml/oci_native_moodle_database.php index 502a266b157..5a158020061 100644 --- a/lib/dml/oci_native_moodle_database.php +++ b/lib/dml/oci_native_moodle_database.php @@ -406,7 +406,7 @@ class oci_native_moodle_database extends moodle_database { oci_free_statement($stmt); $records = array_map('strtolower', $records['TABLE_NAME']); foreach ($records as $tablename) { - if ($this->prefix !== '') { + if ($this->prefix !== false && $this->prefix !== '') { if (strpos($tablename, $this->prefix) !== 0) { continue; } diff --git a/lib/dml/pgsql_native_moodle_database.php b/lib/dml/pgsql_native_moodle_database.php index f4cf21dd0e7..64dcc24a5c3 100644 --- a/lib/dml/pgsql_native_moodle_database.php +++ b/lib/dml/pgsql_native_moodle_database.php @@ -320,7 +320,7 @@ class pgsql_native_moodle_database extends moodle_database { if ($result) { while ($row = pg_fetch_row($result)) { $tablename = reset($row); - if ($this->prefix !== '') { + if ($this->prefix !== false && $this->prefix !== '') { if (strpos($tablename, $this->prefix) !== 0) { continue; } diff --git a/lib/dml/sqlite3_pdo_moodle_database.php b/lib/dml/sqlite3_pdo_moodle_database.php index 7828eb7162f..fcfe446df81 100644 --- a/lib/dml/sqlite3_pdo_moodle_database.php +++ b/lib/dml/sqlite3_pdo_moodle_database.php @@ -150,7 +150,7 @@ class sqlite3_pdo_moodle_database extends pdo_moodle_database { foreach ($rstables as $table) { $table = $table['name']; $table = strtolower($table); - if ($this->prefix !== '') { + if ($this->prefix !== false && $this->prefix !== '') { if (strpos($table, $this->prefix) !== 0) { continue; } diff --git a/lib/dml/sqlsrv_native_moodle_database.php b/lib/dml/sqlsrv_native_moodle_database.php index 093cda6ae66..9521affb460 100644 --- a/lib/dml/sqlsrv_native_moodle_database.php +++ b/lib/dml/sqlsrv_native_moodle_database.php @@ -380,7 +380,7 @@ class sqlsrv_native_moodle_database extends moodle_database { if ($result) { while ($row = sqlsrv_fetch_array($result)) { $tablename = reset($row); - if ($this->prefix !== '') { + if ($this->prefix !== false && $this->prefix !== '') { if (strpos($tablename, $this->prefix) !== 0) { continue; }