forked from loafle/openapi-generator-original
Fix ObjectSerializer::isEmptyValue to not consider "0" as "" (#19472)
This commit is contained in:
@@ -198,6 +198,9 @@ class ObjectSerializer
|
||||
# For boolean values, '' is considered empty
|
||||
'bool','boolean' => !in_array($value, [false, 0], true),
|
||||
|
||||
# For string values, '' is considered empty.
|
||||
'string' => $value === '',
|
||||
|
||||
# For all the other types, any value at this point can be considered empty.
|
||||
default => true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user