MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc show notice when null is passed as an argument
This commit is contained in:
committed by
Andrew Nicols
parent
d83368a475
commit
2dd7290ccb
@@ -594,7 +594,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
|
||||
} else if (preg_match('/int(\d)/i', $rawcolumn->type, $matches)) {
|
||||
$info->type = 'int';
|
||||
if (strpos($rawcolumn->adsrc, 'nextval') === 0) {
|
||||
if (strpos($rawcolumn->adsrc ?? '', 'nextval') === 0) {
|
||||
$info->primary_key = true;
|
||||
$info->meta_type = 'R';
|
||||
$info->unique = true;
|
||||
|
||||
Reference in New Issue
Block a user