diff options
Diffstat (limited to '')
-rw-r--r-- | include/common.inc.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/common.inc.php b/include/common.inc.php index a762eeade..1ddebfc9b 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -21,10 +21,8 @@ // | USA. | // +-----------------------------------------------------------------------+ -if (!defined('PHPWG_ROOT_PATH')) -{ - die('Hacking attempt!'); -} +defined('PHPWG_ROOT_PATH') or trigger_error('Hacking attempt!', E_USER_ERROR); + // determine the initial instant to indicate the generation time of this page $t1 = explode( ' ', microtime() ); $t2 = explode( '.', $t1[0] ); @@ -146,7 +144,7 @@ include(PHPWG_ROOT_PATH . 'include/template.class.php'); @mysql_select_db( $cfgBase ) or my_error( 'mysql_select_db', true ); defined('PWG_CHARSET') and defined('DB_CHARSET') - or die('PWG_CHARSET and/or DB_CHARSET is not defined'); + or fatal_error('PWG_CHARSET and/or DB_CHARSET is not defined'); if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) { if (DB_CHARSET!='') @@ -158,7 +156,7 @@ else { if ( strtolower(PWG_CHARSET)!='iso-8859-1' ) { - die('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info()); + fatal_error('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info()); } } |