Hard deprecate `$wgSysopEmailBans`
[lhc/web/wiklou.git] / includes / Setup.php
index 6838c37..77d2a49 100644 (file)
@@ -442,6 +442,7 @@ if ( $wgEnableEmail ) {
 
 // $wgSysopEmailBans deprecated in 1.34
 if ( isset( $wgSysopEmailBans ) && $wgSysopEmailBans === false ) {
+       wfDeprecated( 'wgSysopEmailBans', '1.34' );
        foreach ( $wgGroupPermissions as $group => $_ ) {
                unset( $wgGroupPermissions[$group]['blockemail'] );
        }
@@ -629,6 +630,15 @@ define( 'MW_SERVICE_BOOTSTRAP_COMPLETE', 1 );
 
 MWExceptionHandler::installHandler();
 
+// T30798: $wgServer must be explicitly set
+if ( $wgServer === false ) {
+       throw new FatalError(
+               '$wgServer must be set in LocalSettings.php. ' .
+               'See <a href="https://www.mediawiki.org/wiki/Manual:$wgServer">' .
+               'https://www.mediawiki.org/wiki/Manual:$wgServer</a>.'
+       );
+}
+
 // T48998: Bail out early if $wgArticlePath is non-absolute
 foreach ( [ 'wgArticlePath', 'wgVariantArticlePath' ] as $varName ) {
        if ( $$varName && !preg_match( '/^(https?:\/\/|\/)/', $$varName ) ) {
@@ -728,7 +738,7 @@ if ( is_null( $wgLocaltimezone ) ) {
 
 date_default_timezone_set( $wgLocaltimezone );
 if ( is_null( $wgLocalTZoffset ) ) {
-       $wgLocalTZoffset = date( 'Z' ) / 60;
+       $wgLocalTZoffset = (int)date( 'Z' ) / 60;
 }
 // The part after the System| is ignored, but rest of MW fills it
 // out as the local offset.