mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Always list the class of an object first
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
950de74d1d
commit
b235a854d3
1 changed files with 3 additions and 3 deletions
|
|
@ -237,11 +237,11 @@ class ExceptionSerializer {
|
|||
];
|
||||
}
|
||||
|
||||
$data = get_object_vars($arg);
|
||||
$data['__class__'] = get_class($arg);
|
||||
$objectInfo = [ '__class__' => get_class($arg) ];
|
||||
$objectVars = get_object_vars($arg);
|
||||
return array_map(function ($arg) use ($nestingLevel) {
|
||||
return $this->encodeArg($arg, $nestingLevel - 1);
|
||||
}, $data);
|
||||
}, array_merge($objectInfo, $objectVars));
|
||||
}
|
||||
|
||||
if (is_array($arg)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue