From b235a854d3d78d0aaf80b6b3920175c5b8d90c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 5 Aug 2021 15:00:41 +0200 Subject: [PATCH] Always list the class of an object first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Log/ExceptionSerializer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index 97541097451..dab134b26a4 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -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)) {