MDL-80706 customfield: php8.1 warning about passing null to strlen
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user