Skip to content

Commit

Permalink
Added check for null
Browse files Browse the repository at this point in the history
  • Loading branch information
omnilight committed Nov 10, 2015
1 parent 1325155 commit 3941eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DateTimeAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3941eba

Please sign in to comment.