Skip to content

Commit

Permalink
Merge branch 'release/3.6.5.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 10, 2021
2 parents 154bd67 + acb1d4e commit 076c414
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft CMS 3.x

## 3.6.5.1 - 2021-02-10

### Fixed
- Fixed a bug where all fields were getting assigned to a field group on save, even if they weren’t global. ([#7540](https://github.com/craftcms/cms/issues/7540))

## 3.6.5 - 2021-02-10

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "craftcms/cms",
"description": "Craft CMS",
"version": "3.6.5",
"version": "3.6.5.1",
"keywords": [
"cms",
"craftcms",
Expand Down
2 changes: 1 addition & 1 deletion src/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'id' => 'CraftCMS',
'name' => 'Craft CMS',
'version' => '3.6.5',
'version' => '3.6.5.1',
'schemaVersion' => '3.6.2',
'minVersionRequired' => '2.6.2788',
'basePath' => dirname(__DIR__), // Defines the @app alias
Expand Down
6 changes: 3 additions & 3 deletions src/services/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ public function applyFieldSave(string $fieldUid, array $data, string $context)

try {
$fieldRecord = $this->_getFieldRecord($fieldUid);
$groupRecord = $this->_getGroupRecord($groupUid);
$groupRecord = $groupUid ? $this->_getGroupRecord($groupUid) : null;
$isNewField = $fieldRecord->getIsNewRecord();
$oldSettings = $fieldRecord->getOldAttribute('settings');

Expand Down Expand Up @@ -1700,7 +1700,7 @@ public function applyFieldSave(string $fieldUid, array $data, string $context)
}

$fieldRecord->uid = $fieldUid;
$fieldRecord->groupId = $groupRecord->id;
$fieldRecord->groupId = $groupRecord->id ?? null;
$fieldRecord->name = $data['name'];
$fieldRecord->handle = $data['handle'];
$fieldRecord->context = $context;
Expand Down Expand Up @@ -1890,7 +1890,7 @@ private function _createLayoutTabQuery(): Query
/**
* Gets a field group record or creates a new one.
*
* @param mixed $criteria ID or UID of the field group.
* @param int|string $criteria ID or UID of the field group.
* @param bool $withTrashed Whether to include trashed field groups in search
* @return FieldGroupRecord
*/
Expand Down
10 changes: 5 additions & 5 deletions src/translations/de-CH/app.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 076c414

Please sign in to comment.