diff --git a/src/Dump.php b/src/Dump.php index 6a51e0f..c14738a 100644 --- a/src/Dump.php +++ b/src/Dump.php @@ -540,8 +540,16 @@ private function formatObject($object) } $prop->setAccessible(true); - $new_obj = $prop->getValue($object); - $tmp .= "{$from} {$this->color("'{$prop->getName()}'", 'property_name')} {$arrow_color} {$this->evaluate(array($new_obj), true, true)}"; + if ($prop->isInitialized($object)) + { + $value = $this->evaluate(array($prop->getValue($object)), true, true); + } + else + { + $value = $this->type('uninitialized'); + } + + $tmp .= "{$from} {$this->color("'{$prop->getName()}'", 'property_name')} {$arrow_color} {$value}"; } if ($tmp != '')