$good = true;
// Must go here because an old version of PCRE can prevent other checks from completing
- list( $pcreVersion ) = explode( ' ', PCRE_VERSION, 2 );
+ $pcreVersion = explode( ' ', PCRE_VERSION, 2 )[0];
if ( version_compare( $pcreVersion, self::MINIMUM_PCRE_VERSION, '<' ) ) {
$this->showError( 'config-pcre-old', self::MINIMUM_PCRE_VERSION, $pcreVersion );
$good = false;
public static function overrideConfig() {
// Use PHP's built-in session handling, since MediaWiki's
// SessionHandler can't work before we have an object cache set up.
- define( 'MW_NO_SESSION_HANDLER', 1 );
+ if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
+ define( 'MW_NO_SESSION_HANDLER', 1 );
+ }
// Don't access the database
$GLOBALS['wgUseDatabaseMessages'] = false;