fall back to debugInfo() for printing objects

Fixes #1122.
This commit is contained in:
Sarah Hoffmann
2018-08-02 00:06:02 +02:00
parent 4a28d28c08
commit 7e0fdf5928
2 changed files with 7 additions and 0 deletions

View File

@@ -114,4 +114,9 @@ class AddressDetails
}
return $aAddress;
}
public function debugInfo()
{
return $this->aAddressLines;
}
}

View File

@@ -153,6 +153,8 @@ class Debug
$sPre = ', ';
}
}
} elseif (is_object($mVar) && method_exists($mVar, 'debugInfo')) {
Debug::outputVar($mVar->debugInfo(), $sPreNL);
} else {
Debug::outputSimpleVar($mVar);
}