Skip to content

Commit

Permalink
Fixed #4382
Browse files Browse the repository at this point in the history
  • Loading branch information
andris-sevcenko committed Jul 11, 2019
1 parent 3ff1333 commit 84d9645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Fixed a bug where Assets fields set to restrict uploads to a single folder could have empty selector modals. ([#4522](https://github.com/craftcms/cms/issues/4522))
- Fixed an error that could occur if a template was accessing the deprecated `locale` property of an element query, but `siteId` wasn’t set to an integer. ([#4531](https://github.com/craftcms/cms/issues/4531))
- Fixed a bug where users without the “Publish live changes” permission for a section weren’t able to create new entries. ([#4528](https://github.com/craftcms/cms/issues/4529))
- Fixed a PHP error that would occur when uploading a file to an Asset field using frontend. ([#4382](https://github.com/craftcms/cms/issues/4382))

## 3.2.0 - 2019-07-09

Expand Down
4 changes: 4 additions & 0 deletions src/fields/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ private function _getUploadedFiles(ElementInterface $element): array
/** @var Element $element */
$uploadedFiles = [];

if (ElementHelper::rootElement($element)->getIsRevision()) {
return $uploadedFiles;
}

// Grab data strings
if (isset($this->_uploadedDataFiles['data']) && is_array($this->_uploadedDataFiles['data'])) {
foreach ($this->_uploadedDataFiles['data'] as $index => $dataString) {
Expand Down

0 comments on commit 84d9645

Please sign in to comment.