Skip to content

Commit 3941eba

Browse files
committed
Added check for null
1 parent 1325155 commit 3941eba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DateTimeAttribute.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ function __invoke()
5454
public function getValue()
5555
{
5656
try {
57-
if ($this->_value)
57+
if ($this->_value !== null) {
5858
return $this->_value;
59-
else {
59+
} else {
6060
$originalValue = $this->behavior->owner->{$this->originalAttribute};
6161
if ($originalValue === null)
6262
return $this->nullValue;

0 commit comments

Comments
 (0)