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
+1
-1
@@ -1463,7 +1463,7 @@ class flexible_table {
|
||||
|
||||
// Load any existing user preferences.
|
||||
if ($this->persistent) {
|
||||
$this->prefs = json_decode(get_user_preferences('flextable_' . $this->uniqueid), true);
|
||||
$this->prefs = json_decode(get_user_preferences('flextable_' . $this->uniqueid) ?? '', true);
|
||||
$oldprefs = $this->prefs;
|
||||
} else if (isset($SESSION->flextable[$this->uniqueid])) {
|
||||
$this->prefs = $SESSION->flextable[$this->uniqueid];
|
||||
|
||||
Reference in New Issue
Block a user