From: Sarah Hoffmann Date: Wed, 1 Aug 2018 22:06:02 +0000 (+0200) Subject: fall back to debugInfo() for printing objects X-Git-Tag: v3.2.0~37 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/7e0fdf5928a0c726b22ad969267a3b9e0402c823 fall back to debugInfo() for printing objects Fixes #1122. --- diff --git a/lib/AddressDetails.php b/lib/AddressDetails.php index 8a4005d9..badf868d 100644 --- a/lib/AddressDetails.php +++ b/lib/AddressDetails.php @@ -114,4 +114,9 @@ class AddressDetails } return $aAddress; } + + public function debugInfo() + { + return $this->aAddressLines; + } } diff --git a/lib/DebugHtml.php b/lib/DebugHtml.php index ff1724d2..a600fae5 100644 --- a/lib/DebugHtml.php +++ b/lib/DebugHtml.php @@ -153,6 +153,8 @@ class Debug $sPre = ', '; } } + } elseif (is_object($mVar) && method_exists($mVar, 'debugInfo')) { + Debug::outputVar($mVar->debugInfo(), $sPreNL); } else { Debug::outputSimpleVar($mVar); }