From: Sarah Hoffmann Date: Fri, 9 Jul 2021 10:50:35 +0000 (+0200) Subject: fix bad use of echo in PHP output X-Git-Tag: v4.0.0~52^2~18 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/106d960f84bac3da085d445f002538acdf6979c9 fix bad use of echo in PHP output --- diff --git a/lib-php/lib.php b/lib-php/lib.php index 8d82c5b3..69c29afa 100644 --- a/lib-php/lib.php +++ b/lib-php/lib.php @@ -47,7 +47,8 @@ function fail($sError, $sUserError = false) { if (!$sUserError) $sUserError = $sError; error_log('ERROR: '.$sError); - var_dump($sUserError)."\n"; + var_dump($sUserError); + echo "\n"; exit(-1); } diff --git a/lib-php/template/error-json.php b/lib-php/template/error-json.php index 67297dd1..73717ff3 100644 --- a/lib-php/template/error-json.php +++ b/lib-php/template/error-json.php @@ -8,4 +8,4 @@ $error['details'] = $exception->getFile() . '('. $exception->getLine() . ')'; } - echo javascript_renderData(array('error' => $error)); + javascript_renderData(array('error' => $error));