-
Bug
-
Resolution: Fixed
-
Critical
-
4.2.6, 4.3.3
-
2
-
Team Hedgehog 2024 Sprint 1.2, Team Hedgehog 2024 Sprint 1.3
I've just encountered some issues when creating a new Text field in xmldb editor:
strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
|
|
// For this line:
|
$length = strtolower(optional_param('length', NULL, PARAM_ALPHANUM));
|
I'm not sure why we'd treat lenght as a string in the first place, and then need to strtolower it.
Fixing this (by making it PARAM_INT) then reveals:
Whoops\Exception\ErrorException thrown with message "trim(): Passing null to parameter #1 ($string) of type string is deprecated"
|
|
Stacktrace:
|
#2 Whoops\Exception\ErrorException in /Users/nicols/Sites/moodles/sm/moodle/admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php:99
|
#1 trim in /Users/nicols/Sites/moodles/sm/moodle/admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php:99
|
#0 edit_field_save:invoke in /Users/nicols/Sites/moodles/sm/moodle/admin/tool/xmldb/index.php:67
|
|
// For this line:
|
$default = trim($default);
|
- is duplicated by
-
MDL-81085 tool_xmldb: Deprecated warnings in PHP 8.2 when creating field
-
- Closed
-