Skip to content
Snippets Groups Projects
Commit 4a9f40f7 authored by h1nds1ght's avatar h1nds1ght Committed by Bram Driesen
Browse files

Issue #3269302 by sgostanyan, h1nds1ght: Deprecated function : trim() with PHP 8.1

parent daa1974c
Branches
Tags
No related merge requests found
......@@ -68,8 +68,8 @@ class TimeRangeType extends FieldItemBase {
* {@inheritdoc}
*/
public function isEmpty() {
$from = $this->get('from')->getValue();
$to = $this->get('to')->getValue();
$from = $this->get('from')->getValue() ?? '';
$to = $this->get('to')->getValue() ?? '';
return trim($from) === '' || trim($to) === '';
}
......
......@@ -83,7 +83,7 @@ class TimeType extends FieldItemBase {
* {@inheritdoc}
*/
public function isEmpty() {
$value = $this->get('value')->getValue();
$value = $this->get('value')->getValue() ?? '';
return trim($value) === '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment