From eb3c1a64e6633c4c0514fc21fa6c38216cb2c0f6 Mon Sep 17 00:00:00 2001 From: Mike Moreau <92817780+mike-moreau@users.noreply.github.com> Date: Thu, 9 May 2024 14:52:40 -0500 Subject: [PATCH] Set initial property values to null to avoid export errors Updated Tag.php to set initial properties to null. Without this, a server error is encountered when exporting Tags in the back end using the "Expanded" exporter. --- src/elements/Tag.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elements/Tag.php b/src/elements/Tag.php index b7c54f1..4e86e48 100644 --- a/src/elements/Tag.php +++ b/src/elements/Tag.php @@ -30,8 +30,8 @@ class Tag extends \craft\elements\Tag // ========================================================================= /** @var Tag|null */ - public ?Tag $replaceWith; - public ?int $usage; + public ?Tag $replaceWith = null; + public ?int $usage = null; // Methods // ========================================================================= @@ -204,4 +204,4 @@ protected static function defineSortOptions (): array return $opts; } -} \ No newline at end of file +}