From 13858cfad578214c083ad3795c456e63c9f8c622 Mon Sep 17 00:00:00 2001 From: sam marshall Date: Wed, 28 Feb 2024 16:22:16 +0000 Subject: [PATCH] MDL-81085 tool_xmldb: Fix PHP 8.2 deprecated warnings --- .../xmldb/actions/edit_field_save/edit_field_save.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php b/admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php index 40bbeee44c910..ca9840edb130c 100644 --- a/admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php +++ b/admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php @@ -91,11 +91,11 @@ function invoke() { $comment = trim($comment); $type = required_param('type', PARAM_INT); - $length = strtolower(optional_param('length', NULL, PARAM_ALPHANUM)); + $length = strtolower(optional_param('length', '', PARAM_ALPHANUM)); $decimals = optional_param('decimals', NULL, PARAM_INT); $notnull = optional_param('notnull', false, PARAM_BOOL); $sequence = optional_param('sequence', false, PARAM_BOOL); - $default = optional_param('default', NULL, PARAM_PATH); + $default = optional_param('default', '', PARAM_PATH); $default = trim($default); $editeddir = $XMLDB->editeddirs[$dirpath]; @@ -272,4 +272,3 @@ function invoke() { return $result; } } -