X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebStart.php;h=29ad456c12acb7e8ff8c7f09c437fa18b4aae245;hb=ee6e8ab1bb938a90ac39c1f8207486b27f2e97f3;hp=82d3955599eba944886c3a1896ce25a233b2a070;hpb=c3ea1b85b420ef6f58a92d65f90df3b23816caf3;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/WebStart.php b/includes/WebStart.php
index 82d3955599..29ad456c12 100644
--- a/includes/WebStart.php
+++ b/includes/WebStart.php
@@ -26,31 +26,11 @@
* @file
*/
-# Die if register_globals is enabled (PHP <=5.3)
-# This must be done before any globals are set by the code
-if ( ini_get( 'register_globals' ) ) {
- die( 'MediaWiki does not support installations where register_globals is enabled. Please see '
- . 'mediawiki.org '
- . 'for help on how to disable it.' );
-}
-
-if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) {
- die( 'MediaWiki does not function when magic quotes are enabled. Please see the '
- . 'PHP Manual '
- . 'for help on how to disable magic quotes.' );
-}
-
-
# bug 15461: Make IE8 turn off content sniffing. Everybody else should ignore this
# We're adding it here so that it's *always* set, even for alternate entry
# points and when $wgOut gets disabled or overridden.
header( 'X-Content-Type-Options: nosniff' );
-# Approximate $_SERVER['REQUEST_TIME_FLOAT'] for PHP<5.4
-if ( !isset( $_SERVER['REQUEST_TIME_FLOAT'] ) ) {
- $_SERVER['REQUEST_TIME_FLOAT'] = microtime( true );
-}
-
/**
* @var float Request start time as fractional seconds since epoch
* @deprecated since 1.25; use $_SERVER['REQUEST_TIME_FLOAT'] or
@@ -86,12 +66,11 @@ require_once "$IP/includes/AutoLoader.php";
require_once "$IP/includes/Defines.php";
# Start the profiler
-$wgProfiler = array();
+$wgProfiler = [];
if ( file_exists( "$IP/StartProfiler.php" ) ) {
require "$IP/StartProfiler.php";
}
-
# Load default settings
require_once "$IP/includes/DefaultSettings.php";
@@ -103,8 +82,11 @@ if ( is_readable( "$IP/vendor/autoload.php" ) ) {
require_once "$IP/vendor/autoload.php";
}
-# assert that composer dependencies were successfully loaded
-if ( !interface_exists( '\Psr\Log\LoggerInterface' ) ) {
+# Assert that composer dependencies were successfully loaded
+# Purposely no leading \ due to it breaking HHVM RepoAuthorative mode
+# PHP works fine with both versions
+# See https://github.com/facebook/hhvm/issues/5833
+if ( !interface_exists( 'Psr\Log\LoggerInterface' ) ) {
$message = (
'MediaWiki requires the PSR-3 logging ' .
"library to be present. This library is not embedded directly in MediaWiki's " .
@@ -138,7 +120,6 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
require_once MW_CONFIG_FILE;
}
-
# Initialise output buffering
# Check that there is no previous output or previously set up buffers, because
# that would cause us to potentially mix gzip and non-gzip output, creating a