From 3941ebaf034cea4dd447848482c4bb2e578ff4af Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 10 Nov 2015 14:12:15 +0300 Subject: [PATCH] Added check for null --- DateTimeAttribute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DateTimeAttribute.php b/DateTimeAttribute.php index a0bbf9c..68675c5 100644 --- a/DateTimeAttribute.php +++ b/DateTimeAttribute.php @@ -54,9 +54,9 @@ function __invoke() public function getValue() { try { - if ($this->_value) + if ($this->_value !== null) { return $this->_value; - else { + } else { $originalValue = $this->behavior->owner->{$this->originalAttribute}; if ($originalValue === null) return $this->nullValue;