Skip to content

Commit

Permalink
Fixed #11155
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 15, 2022
1 parent ed69a23 commit 04ce121
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fixed a bug where Table fields with Min Rows and Max Rows set to `1` were still showing a delete button. ([#11211](https://github.com/craftcms/cms/issues/11211))
- Fixed an error that could occur when saving an Assets field that was restricted to a single location, at the root of a volume. ([#11212](https://github.com/craftcms/cms/issues/11212))
- Fixed an error that could occur after a queue job execution had finished. ([#11213](https://github.com/craftcms/cms/issues/11213))
- Fixed an error that could occur when saving an entry with Matrix blocks. ([#11155](https://github.com/craftcms/cms/issues/11155))

## 4.0.2 - 2022-05-11

Expand Down
4 changes: 3 additions & 1 deletion src/services/Revisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ public function createRevision(ElementInterface $canonical, ?int $creatorId = nu
if (
!$force &&
$lastRevisionInfo &&
DateTimeHelper::toDateTime($lastRevisionInfo['dateCreated'])->getTimestamp() === $canonical->dateUpdated->getTimestamp()
DateTimeHelper::toDateTime($lastRevisionInfo['dateCreated'])->getTimestamp() === $canonical->dateUpdated->getTimestamp() &&
// Make sure all its data is in-tact
$canonical::find()->revisionId($lastRevisionInfo['id'])->status(null)->exists()
) {
// The canonical element hasn't been updated since the last revision's creation date,
// so there's no need to create a new one
Expand Down

0 comments on commit 04ce121

Please sign in to comment.