X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FSetup.php;h=6b80ae6f55845b8f4ea5ed514543d263e0292e75;hp=6838c372608fb3accafae471ab4f8365a783ccf0;hb=326d52f9613c5227d75f97361be6ec6ef78b214e;hpb=4fe1735ba32b11ab9115f36511508885045ebdb2 diff --git a/includes/Setup.php b/includes/Setup.php index 6838c37260..6b80ae6f55 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -629,6 +629,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 ' . + 'https://www.mediawiki.org/wiki/Manual:$wgServer.' + ); +} + // T48998: Bail out early if $wgArticlePath is non-absolute foreach ( [ 'wgArticlePath', 'wgVariantArticlePath' ] as $varName ) { if ( $$varName && !preg_match( '/^(https?:\/\/|\/)/', $$varName ) ) { @@ -728,7 +737,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.