X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FSetup.php;h=de7d59a5808232f044a117ecf89eed8696edef5f;hb=5c94aed0c3ab1f8ee76d37cb4854f80272fc38d7;hp=c9fe8d0fe812b389a0c9f7f8d7d619e00e417302;hpb=6e62381aaa2e0d0ee572e3827800d05d9a5c67a4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index c9fe8d0fe8..de7d59a580 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,10 +37,9 @@ if ( !defined( 'MEDIAWIKI' ) ) { * Pre-config setup: Before loading LocalSettings.php */ -// Get profiler configuraton -$wgProfiler = []; -if ( file_exists( "$IP/StartProfiler.php" ) ) { - require "$IP/StartProfiler.php"; +// Sanity check (T5782, T122807) +if ( ini_get( 'mbstring.func_overload' ) ) { + die( 'MediaWiki does not support installations where mbstring.func_overload is non-zero.' ); } // Start the autoloader, so that extensions can derive classes from core files @@ -85,6 +84,11 @@ MediaWiki\HeaderCallback::register(); * Load LocalSettings.php */ +if ( is_readable( "$IP/StartProfiler.php" ) ) { + // @deprecated since 1.32: Use LocalSettings.php instead. + require "$IP/StartProfiler.php"; +} + if ( defined( 'MW_CONFIG_CALLBACK' ) ) { call_user_func( MW_CONFIG_CALLBACK ); } else { @@ -528,9 +532,9 @@ $wgJsMimeType = 'text/javascript'; $wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) ); if ( $wgInvalidateCacheOnLocalSettingsChange ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', filemtime( "$IP/LocalSettings.php" ) ) ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } if ( $wgNewUserLog ) { @@ -717,9 +721,9 @@ wfMemoryLimit(); * explicitly set. Inspired by phpMyAdmin's treatment of the problem. */ if ( is_null( $wgLocaltimezone ) ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $wgLocaltimezone = date_default_timezone_get(); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } date_default_timezone_set( $wgLocaltimezone ); @@ -874,7 +878,7 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { ) { // Start the PHP-session for backwards compatibility session_id( $session->getId() ); - MediaWiki\quietCall( 'session_start' ); + Wikimedia\quietCall( 'session_start' ); } unset( $session );