diff --git a/src/Dump.php b/src/Dump.php index de330a6..15b2804 100644 --- a/src/Dump.php +++ b/src/Dump.php @@ -536,8 +536,16 @@ private function formatObject($object): string } $prop->setAccessible(true); - $new_obj = $prop->getValue($object); - $tmp .= "{$from} {$this->color("'{$prop->getName()}'", 'property_name')} {$arrow_color} {$this->evaluate([$new_obj], true, true)}"; + if ($prop->isInitialized($object)) + { + $value = $this->evaluate([$prop->getValue($object)], true, true); + } + else + { + $value = $this->type('uninitialized'); + } + + $tmp .= "{$from} {$this->color("'{$prop->getName()}'", 'property_name')} {$arrow_color} {$value}"; } if ($tmp != '')