Skip to content

Commit

Permalink
Fixed #16150
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Nov 19, 2024
1 parent 46d941c commit af25ac5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed an error that could occur if an invalid folder ID was passed to `craft\services\Assets::deleteFoldersByIds()`. ([#16147](https://github.com/craftcms/cms/pull/16147))
- Fixed a SQL error that occurred when creating a new Single section. ([#16145](https://github.com/craftcms/cms/issues/16145))
- Fixed an error that occurred when running the `resave/all` command, if any of the options passed weren’t supported by other `resave/*` commands. ([#16148](https://github.com/craftcms/cms/pull/16148))
- Fixed an error that occurred when restoring a soft-deleted custom field. ([#16150](https://github.com/craftcms/cms/issues/16150))
- Fixed an RCE vulnerability.

## 5.5.1.1 - 2024-11-18
Expand Down
2 changes: 1 addition & 1 deletion src/services/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ public function applyFieldSave(string $fieldUid, array $data, string $context):
// Tell the current CustomFieldBehavior class about the field
CustomFieldBehavior::$fieldHandles[$fieldRecord->handle] = true;

if ($isNewField) {
if ($isNewField || $field === null) {
// Try fetching the field again, if it didn’t exist to begin with
$field ??= $this->getFieldById($fieldRecord->id);
$field->id = $fieldRecord->id;
Expand Down

0 comments on commit af25ac5

Please sign in to comment.