Regression: Fixed saving page with a new language causing cache corruption [#2282]

This commit is contained in:
Matias Griese 2022-05-20 15:55:38 +03:00
parent a7a9b5d132
commit 6fa96ca554
3 changed files with 11 additions and 6 deletions

View File

@ -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

12
composer.lock generated
View File

@ -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",

View File

@ -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,