From 5cb15746fcd5e54af9c15940be188f96d8949a2e Mon Sep 17 00:00:00 2001 From: Eugene Gorbov Date: Tue, 4 Jun 2013 16:57:57 +0400 Subject: [PATCH] Save Date Bugfix; --- src/morph/property/Date.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/morph/property/Date.php b/src/morph/property/Date.php index 47e7cab..23a7f47 100644 --- a/src/morph/property/Date.php +++ b/src/morph/property/Date.php @@ -36,11 +36,10 @@ public function getValue() */ public function setValue($value = null) { - if (isset($value)) { - $this->value = (int)$value; - } else { - $this->value = null; - } + if (null === $value) { + return parent::setValue(null); + } + parent::setValue((int)$value); } /**