]> git.openstreetmap.org Git - nominatim.git/commitdiff
fall back to debugInfo() for printing objects
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 1 Aug 2018 22:06:02 +0000 (00:06 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 1 Aug 2018 22:06:02 +0000 (00:06 +0200)
Fixes #1122.

lib/AddressDetails.php
lib/DebugHtml.php

index 8a4005d9f45fa29c51cb1b6ce289cecfba1e9280..badf868de8774ab5c568b1119a51594e8c987882 100644 (file)
@@ -114,4 +114,9 @@ class AddressDetails
         }
         return $aAddress;
     }
+
+    public function debugInfo()
+    {
+        return $this->aAddressLines;
+    }
 }
index ff1724d2a61a76ec6f674fedeb456f1c6feba19d..a600fae58124edc6a441ad587bcbcf2e4652d67a 100644 (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);
         }