1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(tests): try to fix tests for php8 in entries fetch #477

This commit is contained in:
Awilum
2020-12-11 14:35:36 +03:00
parent b27e851f6d
commit 17a7dc2bba

View File

@@ -150,6 +150,9 @@ class Entries
$cache = flextype('entries')->storage['fetch']['data']['cache']['enabled'] ??
flextype('registry')->get('flextype.settings.cache.enabled');
// Run event: onEntriesFetchSingleHasResult
flextype('emitter')->emit('onEntriesFetchSingleHasResult');
// Save entry data to cache
if ($cache) {
flextype('cache')->set($entryCacheID, $this->storage['fetch']['data']);
@@ -159,9 +162,6 @@ class Entries
$this->storage['fetch']['data'] = filter($this->storage['fetch']['data'],
$this->storage['fetch']['options']);
// Run event: onEntriesFetchSingleHasResult
flextype('emitter')->emit('onEntriesFetchSingleHasResult');
// Return entry data
return arrays($this->storage['fetch']['data']);
}