mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed Flex Object missing key field value when using FolderStorage
This commit is contained in:
parent
e390e9901e
commit
5437d2db1a
|
|
@ -11,6 +11,7 @@
|
|||
* Fixed error in `loadDirectoryConfig()` if configuration hasn't been saved [#3409](https://github.com/getgrav/grav/issues/3409)
|
||||
* Fixed GPM not using non-standard cache path [#3410](https://github.com/getgrav/grav/issues/3410)
|
||||
* Fixed broken `environment://` stream when it doesn't have configuration
|
||||
* Fixed `Flex Object` missing key field value when using `FolderStorage`
|
||||
|
||||
# v1.7.18
|
||||
## 07/19/2021
|
||||
|
|
|
|||
|
|
@ -380,6 +380,12 @@ class FolderStorage extends AbstractFilesystemStorage
|
|||
if (isset($data[0])) {
|
||||
throw new RuntimeException('Broken object file');
|
||||
}
|
||||
|
||||
// Add key field to the object.
|
||||
$keyField = $this->keyField;
|
||||
if ($keyField !== 'storage_key' && !isset($data[$keyField])) {
|
||||
$data[$keyField] = $key;
|
||||
}
|
||||
} catch (RuntimeException $e) {
|
||||
$data = ['__ERROR' => $e->getMessage()];
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user