Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
sabina-talipova committed Jul 11, 2023
1 parent bd9ebb7 commit 69cc7ed
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Shortcodes/FileShortcodeProvider.php
Expand Up @@ -140,13 +140,10 @@ protected static function getCachedMarkup($cache, $cacheKey, $arguments): string
{
$item = $cache->get($cacheKey);
$assetStore = Injector::inst()->get(AssetStore::class);
if ($item
&& !empty($item['filename'])
&& $assetStore->exists($item['filename'], $item['hash'])
&& $item['markup']) {
if ($item && !empty($item['filename']) && $item['markup']) {
// Initiate a protected asset grant if necessary
$allowSessionGrant = static::getGrant(null, $arguments);
if ($allowSessionGrant) {
if ($allowSessionGrant && $assetStore->exists($item['filename'], $item['hash'])) {
$assetStore->grant($item['filename'], $item['hash']);
return $item['markup'];
}
Expand Down

0 comments on commit 69cc7ed

Please sign in to comment.