mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-19 16:13:00 +02:00
- better management of fatal errors (instead of die or trigger_error rather use fatal_error ...)
git-svn-id: http://piwigo.org/svn/trunk@2502 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user