Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec0df6d

Browse files
committed
Fix error cannot use object of type as array
1 parent 6f563e6 commit ec0df6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private function dumpData(mixed $data, bool $colors = null): string
188188
$this->dumper->setColors($colors);
189189
}
190190

191-
if (($data['data'] ?? null) instanceof Data) {
191+
if (\is_array($data) && ($data['data'] ?? null) instanceof Data) {
192192
$data = $data['data'];
193193
} elseif (!$data instanceof Data) {
194194
$data = $this->cloner->cloneVar($data);

0 commit comments

Comments
 (0)