Skip to content

Commit

Permalink
[5.6] Do not use setCreatedAt if CREATED_AT is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlindaruk committed Mar 20, 2018
1 parent 350ea24 commit 273b7fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function updateTimestamps()
$this->setUpdatedAt($time);
}

if (! $this->exists && ! $this->isDirty(static::CREATED_AT)) {
if (! $this->exists && ! is_null(static::CREATED_AT) && ! $this->isDirty(static::CREATED_AT)) {
$this->setCreatedAt($time);
}
}
Expand Down

0 comments on commit 273b7fc

Please sign in to comment.