diff --git a/lib/dml/pgsql_native_moodle_database.php b/lib/dml/pgsql_native_moodle_database.php index 47d050b2649..f47ebd7cfd1 100644 --- a/lib/dml/pgsql_native_moodle_database.php +++ b/lib/dml/pgsql_native_moodle_database.php @@ -182,7 +182,7 @@ class pgsql_native_moodle_database extends moodle_database { } // Select schema if specified, otherwise the first one wins. - if (isset($this->dboptions['dbschema'])) { + if (!empty($this->dboptions['dbschema'])) { $sql .= "SET search_path = '".$this->dboptions['dbschema']."'; "; }