Skip to content

Commit

Permalink
Really fixed #3823
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 15, 2019
1 parent 352d46e commit c20adf2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixed
- Fixed a bug where the `relatedTo` element query param could include results for elements that were related via soft-deleted Matrix blocks. ([#3846](https://github.com/craftcms/cms/issues/3846))
- Fixed a bug where some search queries were not returning results when they should, if using MySQL.
- Fixed an error that could occur when syncing `project.yaml` changes if the `allowAdminChanges` config setting was disabled. ([#3823](https://github.com/craftcms/cms/issues/3823))

## 3.1.11 - 2019-02-14

Expand Down Expand Up @@ -62,7 +63,6 @@
- Fixed a bug where only users with the “Edit users” user permission were allowed to upload a new user photo. ([#3735](https://github.com/craftcms/cms/issues/3735))
- Fixed a bug where renaming a Matrix block type’s handle would result in new content columns being created in the database, and existing Matrix blocks losing their content. ([#3809](https://github.com/craftcms/cms/issues/3809))
- Fixed a SQL error that could occur when updating to Craft 3.1 if any system messages contained emoji characters.
- Fixed an error that could occur when syncing `project.yaml` changes if the `allowAdminChanges` config setting was disabled. ([#3823](https://github.com/craftcms/cms/issues/3823))
- Fixed an error that could occur when working with elements, if a site had been created earlier in the same request. ([#3824](https://github.com/craftcms/cms/issues/3824))

## 3.1.8 - 2019-02-05
Expand Down
16 changes: 9 additions & 7 deletions src/services/ProjectConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,19 @@ public function get(string $path = null, $getFromYaml = false)
*/
public function set(string $path, $value)
{
if ($this->readOnly && $value !== $this->get($path)) {
throw new NotSupportedException('Changes to the project config are not possible while in read-only mode.');
if ($value !== $this->get($path)) {
if ($this->readOnly) {
throw new NotSupportedException('Changes to the project config are not possible while in read-only mode.');
}

if (!$this->_timestampUpdated) {
$this->_timestampUpdated = true;
$this->set('dateModified', DateTimeHelper::currentTimeStamp());
}
}

$targetFilePath = null;

if (!$this->_timestampUpdated) {
$this->_timestampUpdated = true;
$this->set('dateModified', DateTimeHelper::currentTimeStamp());
}

if ($this->_useConfigFile()) {
$configMap = $this->_getStoredConfigMap();

Expand Down

0 comments on commit c20adf2

Please sign in to comment.