MDL-70965 core_dml: php8 related changes:

1. pg_connection_status(false) fails on PHP8 because the argument is not a stream
2. skipeed the unittest that expected that pg_query() does not show an error if the resource is invalid
see also MDL-71482
This commit is contained in:
Marina Glancy
2021-04-28 12:42:41 +02:00
parent 99e536fc4c
commit 86d19b3474
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ class pgsql_native_moodle_database extends moodle_database {
$dberr = ob_get_contents();
ob_end_clean();
$status = pg_connection_status($this->pgsql);
$status = $this->pgsql ? pg_connection_status($this->pgsql) : false;
if ($status === false or $status === PGSQL_CONNECTION_BAD) {
$this->pgsql = null;