MDL-80706 customfield: php8.1 warning about passing null to strlen

This commit is contained in:
Marina Glancy
2024-01-23 14:58:17 +00:00
parent 9d3e70fe06
commit d26d56ee34
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -650,7 +650,7 @@ abstract class handler {
}
$data->instance_form_definition($mform);
$field = $data->get_field()->to_record();
if (strlen($field->description)) {
if (strlen((string)$field->description)) {
// Add field description.
$context = $this->get_configuration_context();
$value = file_rewrite_pluginfile_urls($field->description, 'pluginfile.php',