Skip to content

Commit 0c5142a

Browse files
authored
[php-symfony] Fix #19562 (#19568)
1 parent a5384d4 commit 0c5142a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}
5252
*/
5353
public function getSerialized{{nameInPascalCase}}(): string|null
5454
{
55-
return $this->{{name}}?->value ? (string) $this->{{name}}->value : null;
55+
return !is_null($this->{{name}}?->value) ? (string) $this->{{name}}->value : null;
5656
}
5757

5858
/**

0 commit comments

Comments
 (0)