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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user