[core] Removed context from the error handler

This commit is contained in:
Marc Delisle
2009-10-11 12:27:21 +00:00
parent 6a803f65d3
commit d7ffee57e1
3 changed files with 7 additions and 26 deletions

View File

@@ -42,6 +42,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
thanks to Derek Schaefer - drummingds1
+ [lang] Turkish update, thanks to Burak Yavuz
+ [auth] Add custom port configuration in signon, thanks to Gary Smith
- [core] Removed context from the error handler
3.2.3.0 (not yet released)
- patch #2856664 [export] Date, time, and datetime column types now export correctly to

View File

@@ -77,14 +77,6 @@ class PMA_Error extends PMA_Message
*/
protected $_line = 0;
/**
* Holds any variables defined in the context where the error occured
* f. e. $this if the error occured in an object method
*
* @var array
*/
protected $_context = array();
/**
* Holds the backtrace for this error
*
@@ -107,21 +99,18 @@ class PMA_Error extends PMA_Message
* @uses PMA_Error::setMessage()
* @uses PMA_Error::setFile()
* @uses PMA_Error::setLine()
* @uses PMA_Error::setContext()
* @uses PMA_Error::setBacktrace()
* @param integer $errno
* @param string $errstr
* @param string $errfile
* @param integer $errline
* @param array $errcontext
*/
public function __construct($errno, $errstr, $errfile, $errline, $errcontext)
public function __construct($errno, $errstr, $errfile, $errline)
{
$this->setNumber($errno);
$this->setMessage($errstr, false);
$this->setFile($errfile);
$this->setLine($errline);
$this->setContext($errcontext);
$backtrace = debug_backtrace();
// remove last two calls: debug_backtrace() and handleError()
@@ -142,17 +131,6 @@ class PMA_Error extends PMA_Message
$this->_backtrace = $backtrace;
}
/**
* sets PMA_Error::$_context
*
* @uses PMA_Error::$_context to set it
* @param array $context
*/
public function setContext($context)
{
$this->_context = $context;
}
/**
* sets PMA_Error::$_line
*

View File

@@ -88,6 +88,9 @@ class PMA_Error_Handler
* E_COMPILE_WARNING,
* and most of E_STRICT raised in the file where set_error_handler() is called.
*
* Do not use the context parameter as we want to avoid storing the
* complete $GLOBALS inside $_SESSION['errors']
*
* @uses E_USER_NOTICE
* @uses E_USER_WARNING
* @uses E_STRICT
@@ -110,12 +113,11 @@ class PMA_Error_Handler
* @param string $errstr
* @param string $errfile
* @param integer $errline
* @param array $errcontext
*/
public function handleError($errno, $errstr, $errfile, $errline, $errcontext)
public function handleError($errno, $errstr, $errfile, $errline)
{
// create error object
$error = new PMA_Error($errno, $errstr, $errfile, $errline, $errcontext);
$error = new PMA_Error($errno, $errstr, $errfile, $errline);
// do not repeat errors
$this->_errors[$error->getHash()] = $error;