diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d5f7d76b..cbceb3641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## mm/dd/2022 1. [](#bugfix) + * Regression: Fixed saving page with a new language causing cache corruption [#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282) * Fixed a potential fatal error when using watermark in images # v1.7.33 diff --git a/composer.lock b/composer.lock index 88afa4202..fc34f8221 100644 --- a/composer.lock +++ b/composer.lock @@ -4679,16 +4679,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.6.7", + "version": "1.6.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d41c39cb2e487663bce9bbd97c660e244b73abad" + "reference": "d76498c5531232cb8386ceb6004f7e013138d3ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d41c39cb2e487663bce9bbd97c660e244b73abad", - "reference": "d41c39cb2e487663bce9bbd97c660e244b73abad", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d76498c5531232cb8386ceb6004f7e013138d3ba", + "reference": "d76498c5531232cb8386ceb6004f7e013138d3ba", "shasum": "" }, "require": { @@ -4714,7 +4714,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.6.7" + "source": "https://github.com/phpstan/phpstan/tree/1.6.8" }, "funding": [ { @@ -4734,7 +4734,7 @@ "type": "tidelift" } ], - "time": "2022-05-04T22:55:41+00:00" + "time": "2022-05-10T06:54:21+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", diff --git a/system/src/Grav/Common/File/CompiledFile.php b/system/src/Grav/Common/File/CompiledFile.php index 9393ab70f..eaf46f702 100644 --- a/system/src/Grav/Common/File/CompiledFile.php +++ b/system/src/Grav/Common/File/CompiledFile.php @@ -138,6 +138,10 @@ trait CompiledFile $class = get_class($this); $size = filesize($filename); + // Reload data from the filesystem. This ensures that we always cache the correct data (see issue #2282). + $this->raw = $this->content = null; + $data = (array)$this->decode($this->raw()); + // Decode data into compiled array. $cache = [ '@class' => $class,