mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-26 16:28:31 -04:00
Use Fatal function to report bad timezone
This commit is contained in:
1 parent
24454253af
commit
4a280a73d1
1 file changed
+6
-7
+6
-7
@@ -46,13 +46,6 @@ if ( false )
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
// Check time zone is set
|
||||
if (!ini_get('date.timezone')) {
|
||||
trigger_error( "ZoneMinder is not installed properly: date.timezone in php.ini is unset", E_USER_ERROR );
|
||||
} else if(!date_default_timezone_set(ini_get('date.timezone'))) {
|
||||
trigger_error( "ZoneMinder is not installed properly: date.timezone in php.ini is invalid", E_USER_ERROR );
|
||||
}
|
||||
|
||||
require_once( 'includes/config.php' );
|
||||
require_once( 'includes/logger.php' );
|
||||
|
||||
@@ -67,6 +60,12 @@ else
|
||||
define( "ZM_BASE_PROTOCOL", $protocol );
|
||||
define( "ZM_BASE_URL", $protocol.'://'.$_SERVER['HTTP_HOST'] );
|
||||
|
||||
// Check time zone is set
|
||||
if (!ini_get('date.timezone') || !date_default_timezone_set(ini_get('date.timezone'))) {
|
||||
date_default_timezone_set('UTC');
|
||||
Fatal( "ZoneMinder is not installed properly: date.timezone in php.ini is not set to a valid timezone" );
|
||||
}
|
||||
|
||||
if ( isset($_GET['skin']) )
|
||||
$skin = $_GET['skin'];
|
||||
elseif ( isset($_COOKIE['zmSkin']) )
|
||||
|
||||
Reference in new issue
Block a user