MDL-83835 lib: PEAR - passing null to str functions is deprecated

This commit is contained in:
raortegar 2024-12-02 13:10:09 +01:00
parent 7da8af1006
commit 77f7082c03
2 changed files with 2 additions and 2 deletions

View File

@ -496,7 +496,7 @@ JAVASCRIPT;
$ret = parent::onQuickFormEvent($event, $arg, $caller);
// add onreset handler to form to properly reset hierselect (see bug #2970)
if ('addElement' == $event) {
$onReset = $caller->getAttribute('onreset');
$onReset = $caller->getAttribute('onreset') ?? '';
if (strlen($onReset)) {
if (strpos($onReset, '_hs_setupOnReset')) {
$caller->updateAttributes(array('onreset' => str_replace('_hs_setupOnReset(this, [', "_hs_setupOnReset(this, ['" . $this->_escapeString($this->getName()) . "', ", $onReset)));

View File

@ -32,7 +32,7 @@ MDL-70457 - PHP 7.4 curly brackets string access fix.
MDL-71126 - Quiz: Manual grading page size preference can get stuck at 0
Including in this change:
- New positiveint regex rule to check if the value is a positive integer
MDL-76102 / MDL-77081
MDL-76102 / MDL-77081 / MDL-83835
PHP 8.1 passing null to a non-nullable argument of a built-in function is deprecated
MDL-77164 - PHPdocs corrections
MDL-78145 - PHP 8.2 compliance. Added a missing class property that still need to be declared