diff --git a/src/flextype/core/Entries/Directives/ExpressionsDirective.php b/src/flextype/core/Entries/Directives/ExpressionsDirective.php index b550e39c..05ced1af 100644 --- a/src/flextype/core/Entries/Directives/ExpressionsDirective.php +++ b/src/flextype/core/Entries/Directives/ExpressionsDirective.php @@ -34,6 +34,8 @@ emitter()->addListener('onEntriesFetchSingleField', static function (): void { $field = entries()->registry()->get('methods.fetch.field'); + $vars = []; + // Convert entry fields to vars. foreach (json_decode(json_encode((object) entries()->registry()->get('methods.fetch.result')), false) as $key => $value) { $vars[$key] = $value; diff --git a/src/flextype/core/Parsers/Shortcodes/EvalShortcode.php b/src/flextype/core/Parsers/Shortcodes/EvalShortcode.php index 67f35449..44337e20 100644 --- a/src/flextype/core/Parsers/Shortcodes/EvalShortcode.php +++ b/src/flextype/core/Parsers/Shortcodes/EvalShortcode.php @@ -41,6 +41,6 @@ parsers()->shortcodes()->addHandler('eval', static function (ShortcodeInterface }); parsers()->shortcodes()->addHandler('compile', static function (ShortcodeInterface $s) { - return expression()->compile(parsers()->shortcodes()->parse($s->getContent())); + return parsers()->expressions()->compile(parsers()->shortcodes()->parse($s->getContent())); });