Skip to content

Commit b488a5d

Browse files
committed
Don't set any default attributes on revisions
1 parent 8094daf commit b488a5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/elements/Entry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3011,7 +3011,7 @@ public function beforeSave(bool $isNew): bool
30113011
private function maybeSetDefaultAttributes(): void
30123012
{
30133013
// if we're resaving, we shouldn't be setting the defaults
3014-
if ($this->resaving) {
3014+
if ($this->resaving || $this->getIsRevision()) {
30153015
return;
30163016
}
30173017

@@ -3031,7 +3031,7 @@ private function maybeSetDefaultAttributes(): void
30313031
!$this->_userPostDate() &&
30323032
(
30333033
in_array($this->scenario, [self::SCENARIO_LIVE, self::SCENARIO_DEFAULT]) ||
3034-
(!$this->getIsDraft() && !$this->getIsRevision())
3034+
!$this->getIsDraft()
30353035
)
30363036
) {
30373037
// Default the post date to the current date/time

0 commit comments

Comments
 (0)