Skip to content

Commit

Permalink
Merge branch 'develop' into 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 2, 2023
2 parents ccc288c + b914a44 commit 9e70ab1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- Fixed a bug where user group condition rules for the default user group weren’t getting matched properly during public registration. ([#12283](https://github.com/craftcms/cms/issues/12283))
- Fixed a bug where HTML tags within field labels, instructions, tips, and warnings weren’t always getting escaped.
- Fixed a bug where the sidebar scroll position wasn’t retained when selecting a new source on element index pages. ([#12523](https://github.com/craftcms/cms/issues/12523))
- Fixed a bug where `resave/*` commands’ output didn’t take the offset into account. ([#12526](https://github.com/craftcms/cms/issues/12526))
- Fixed a bug where warnings were getting logged for video assets that were “missing” their dimensions.
- Deprecated `craft\helpers\DateTimeHelper::timeZoneAbbreviation()`.
- Deprecated `craft\helpers\DateTimeHelper::timeZoneOffset()`.

Expand Down
4 changes: 4 additions & 0 deletions src/console/controllers/ResaveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ private function _resaveElements(ElementQueryInterface $query): int
return ExitCode::OK;
}

if ($query->offset) {
$count = max($count - (int)$query->offset, 0);
}

if ($query->limit) {
$count = min($count, (int)$query->limit);
}
Expand Down
5 changes: 4 additions & 1 deletion src/elements/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2972,7 +2972,10 @@ private function _dimensions(mixed $transform = null): array
}

if (!$this->_width || !$this->_height) {
if ($this->getScenario() !== self::SCENARIO_CREATE) {
if (
$this->kind === self::KIND_IMAGE &&
$this->getScenario() !== self::SCENARIO_CREATE
) {
Craft::warning("Asset $this->id is missing its width or height", __METHOD__);
}

Expand Down

0 comments on commit 9e70ab1

Please sign in to comment.