From de3181277e747a94fb0b0213f3d11576458b72cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 11 Jul 2016 09:18:19 +0200 Subject: [PATCH 1/2] Include only relative path in backtrace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/Error.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/Error.php b/libraries/Error.php index 5caec03852..6548877c60 100644 --- a/libraries/Error.php +++ b/libraries/Error.php @@ -117,12 +117,17 @@ class Error extends Message { $result = array(); - $members = array('file', 'line', 'function', 'class', 'type'); + $members = array('line', 'function', 'class', 'type'); foreach ($backtrace as $idx => $step) { /* Create new backtrace entry */ $result[$idx] = array(); + /* Make path relative */ + if (isset($step['file'])) { + $result[$idx]['file'] = Error::relPath($step['file']); + } + /* Store members we want */ foreach ($members as $name) { if (isset($step[$name])) { From 660e3a177f4933018c94ba1270a61b2437aa1163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 11 Jul 2016 09:31:55 +0200 Subject: [PATCH 2/2] Remove debugging code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/core.lib.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 037227d797..093141341f 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -520,11 +520,6 @@ function PMA_sendHeaderLocation($uri, $use_refresh = false) session_write_close(); if ($response->headersSent()) { - if (function_exists('debug_print_backtrace')) { - echo '
';
-            debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
-            echo '
'; - } trigger_error( 'PMA_sendHeaderLocation called when headers are already sent!', E_USER_ERROR