new error handler ...

This commit is contained in:
Sebastian Mendel
2007-10-08 15:13:44 +00:00
parent e623dc42cf
commit b43ab99c15
3 changed files with 8 additions and 1 deletions

View File

@@ -414,7 +414,7 @@ class PMA_Error
{ {
echo '<div class="' . $this->getLevel() . '">'; echo '<div class="' . $this->getLevel() . '">';
echo '<strong>' . $this->getType() . '</strong>'; echo '<strong>' . $this->getType() . '</strong>';
echo ' (' . $this->getHash() . ')'; echo ' in ' . $this->getFile() . '#' . $this->getLine();
echo "<br />\n"; echo "<br />\n";
echo $this->getMessage(); echo $this->getMessage();
echo "<br />\n"; echo "<br />\n";

View File

@@ -29,8 +29,14 @@
* @version $Id$ * @version $Id$
*/ */
/**
* the error handler
*/
require_once './libraries/Error_Handler.class.php'; require_once './libraries/Error_Handler.class.php';
/**
* initialize the error handler
*/
$GLOBALS['error_handler'] = new PMA_Error_Handler(); $GLOBALS['error_handler'] = new PMA_Error_Handler();
// at this point PMA_PHP_INT_VERSION is not yet defined // at this point PMA_PHP_INT_VERSION is not yet defined

View File

@@ -75,6 +75,7 @@ $_import_blacklist = array(
'/^sql_query$/i', // the query to be executed '/^sql_query$/i', // the query to be executed
'/^GLOBALS$/i', // the global scope '/^GLOBALS$/i', // the global scope
'/^str.*$/i', // PMA localized strings '/^str.*$/i', // PMA localized strings
'/^error_handler.*$/i', // the error handler
'/^_.*$/i', // PMA does not use variables starting with _ from extern '/^_.*$/i', // PMA does not use variables starting with _ from extern
'/^.*\s+.*$/i', // no whitespaces anywhere '/^.*\s+.*$/i', // no whitespaces anywhere
'/^[0-9]+.*$/i', // numeric variable names '/^[0-9]+.*$/i', // numeric variable names