[php-symfony] Fix #19562 (#19568)

This commit is contained in:
Julian Vennen 2024-09-16 05:41:49 -04:00 committed by GitHub
parent a5384d42b4
commit 0c5142a6f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
/**