From 28ccf2021d49f188505dba427813507806933ae0 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 16 May 2022 14:09:56 +0300 Subject: [PATCH] feat(directives): upd string type for `@type` directive --- src/flextype/core/Entries/Directives/TypesDirective.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/core/Entries/Directives/TypesDirective.php b/src/flextype/core/Entries/Directives/TypesDirective.php index 870d2bcd..da4b7feb 100644 --- a/src/flextype/core/Entries/Directives/TypesDirective.php +++ b/src/flextype/core/Entries/Directives/TypesDirective.php @@ -58,7 +58,7 @@ emitter()->addListener('onEntriesFetchSingleField', static function (): void { $field['value'] = collectionFromQueryString($field['value']->toString()); } } elseif (strings($field['value'])->contains('@type(string)')) { - $field['value'] = (string) $field['value']; + $field['value'] = strings(strings($field['value'])->replace('@type(string)', '')->trim())->toString(); } elseif (strings($field['value'])->contains('@type(null)')) { $field['value'] = null; }