Return empty from Backend::dateTime instead of current date (#3246)
This changes Backend::dateTime to return an empty string instead of the current date when dealing with a null date. It should only affect the date field preview instance. Credit to @pvullioud
This commit is contained in:
parent
c85f8297d2
commit
cc082d0510
|
|
@ -118,6 +118,10 @@ class Backend
|
|||
'timeSince' => false,
|
||||
'ignoreTimezone' => false,
|
||||
], $options));
|
||||
|
||||
if(!$dateTime) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$carbon = DateTimeHelper::makeCarbon($dateTime);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue