Skip to content

Commit fe0295e

Browse files
segadorataylorotwell
authored andcommitted
Fix updated at being set in SoftDeletes (#21286)
Refs #21178
1 parent 5bd7c77 commit fe0295e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/SoftDeletes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function runSoftDelete()
6666

6767
$this->{$this->getDeletedAtColumn()} = $time;
6868

69-
if ($this->timestamps) {
69+
if ($this->timestamps && ! is_null($this->getUpdatedAtColumn())) {
7070
$this->{$this->getUpdatedAtColumn()} = $time;
7171

7272
$columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time);

0 commit comments

Comments
 (0)