From 0c5142a6f68963cebdc5ecbff0e0cde16a31fb89 Mon Sep 17 00:00:00 2001 From: Julian Vennen Date: Mon, 16 Sep 2024 05:41:49 -0400 Subject: [PATCH] [php-symfony] Fix #19562 (#19568) --- .../src/main/resources/php-symfony/model_generic.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache index 9dba64f5345..962a4cdb2d5 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache @@ -52,7 +52,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}} */ public function getSerialized{{nameInPascalCase}}(): string|null { - return $this->{{name}}?->value ? (string) $this->{{name}}->value : null; + return !is_null($this->{{name}}?->value) ? (string) $this->{{name}}->value : null; } /**