mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-77539 blog: null coalesce external blog form name/description.
We can't pass null to most string related functions (e.g. `trim`) in PHP8.1 onwards.
This commit is contained in:
parent
f49f934786
commit
1818a6841b
@ -98,8 +98,8 @@ class blog_edit_external_form extends moodleform {
|
||||
global $CFG, $COURSE;
|
||||
$mform =& $this->_form;
|
||||
|
||||
$name = trim($mform->getElementValue('name'));
|
||||
$description = trim($mform->getElementValue('description'));
|
||||
$name = trim($mform->getElementValue('name') ?? '');
|
||||
$description = trim($mform->getElementValue('description') ?? '');
|
||||
$url = $mform->getElementValue('url');
|
||||
|
||||
if (empty($name) || empty($description)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user