From 8b26dc534d80b22d85ece4cfb24bbcb71cd3936e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 8 Feb 2013 09:02:14 +0100 Subject: [PATCH] Fix backtrace collected on error Since adding of another level of abstraction (addError), the handleError method stayed in the backtrace. This lead to non useful backtraces and explosion of session data size as handleError gets GLOBALS as one of argument in case of user errors. --- libraries/Error.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Error.class.php b/libraries/Error.class.php index 8bafbc3f00..059fbca11b 100644 --- a/libraries/Error.class.php +++ b/libraries/Error.class.php @@ -106,9 +106,9 @@ class PMA_Error extends PMA_Message $this->setLine($errline); $backtrace = debug_backtrace(); - // remove last two calls: debug_backtrace() and handleError() - unset($backtrace[0]); - unset($backtrace[1]); + // remove last three calls: + // debug_backtrace(), handleError() and addError() + $backtrace = array_slice($backtrace, 3); $this->setBacktrace($backtrace); }