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.
This commit is contained in:
Michal Čihař 2013-02-08 09:02:14 +01:00
parent 34faa9897e
commit 1f983ff328

View File

@ -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);
}