From 802a375f7e9ac79f22701a028f250a900c177b3a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 18 Dec 2022 10:49:02 +0100 Subject: [PATCH] Method should return object not string --- .../src/Framework/Actions/CreatesNewPublicationPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Framework/Actions/CreatesNewPublicationPage.php b/packages/framework/src/Framework/Actions/CreatesNewPublicationPage.php index 248b1ca624a..abc884608c6 100644 --- a/packages/framework/src/Framework/Actions/CreatesNewPublicationPage.php +++ b/packages/framework/src/Framework/Actions/CreatesNewPublicationPage.php @@ -77,10 +77,10 @@ protected function handleCreate(): void $this->save($output); } - protected function handleMissingCanonicalField(string $canonicalFieldName): string + protected function handleMissingCanonicalField(string $canonicalFieldName): PublicationFieldType { if (str_starts_with($canonicalFieldName, '__')) { - return $canonicalFieldName; + return new PublicationFieldType('text', $canonicalFieldName, '0', '0'); } return throw new RuntimeException(