[php] fix 'mixed' invalid for settype() (#10576)

Signed-off-by: Nick Ufer <nick@ufer.dev>
This commit is contained in:
Nick Ufer 2021-10-12 10:28:59 +02:00 committed by GitHub
parent b4206ad249
commit 80c3a0e4c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -296,6 +296,9 @@ class ObjectSerializer
if ($class === 'object') { if ($class === 'object') {
settype($data, 'array'); settype($data, 'array');
return $data; return $data;
} else if ($class === 'mixed') {
settype($data, gettype($data));
return $data;
} }
if ($class === '\DateTime') { if ($class === '\DateTime') {

View File

@ -305,6 +305,9 @@ class ObjectSerializer
if ($class === 'object') { if ($class === 'object') {
settype($data, 'array'); settype($data, 'array');
return $data; return $data;
} else if ($class === 'mixed') {
settype($data, gettype($data));
return $data;
} }
if ($class === '\DateTime') { if ($class === '\DateTime') {