X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Fupdate.php;h=85364ee3a33301032c56f25baf1c4c72387e1c4e;hb=9ed334b55c57fa387cb25bd3a14bc90af345903e;hp=beed72089d17302eebc8880478ec3ae340b3a455;hpb=1728c1a698cb3327abb102c2475cba0682e9ce18;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/update.php b/maintenance/update.php index beed72089d..85364ee3a3 100644 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -57,25 +57,27 @@ class UpdateMediaWiki extends Maintenance { } function compatChecks() { - $test = new PhpXmlBugTester(); - if ( !$test->ok ) { + // Avoid syntax error in PHP4 + $minimumPcreVersion = constant( 'Installer::MINIMUM_PCRE_VERSION' ); + + list( $pcreVersion ) = explode( ' ', PCRE_VERSION, 2 ); + if ( version_compare( $pcreVersion, $minimumPcreVersion, '<' ) ) { $this->error( - "Your system has a combination of PHP and libxml2 versions which is buggy\n" . - "and can cause hidden data corruption in MediaWiki and other web apps.\n" . - "Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later!\n" . - "ABORTING (see http://bugs.php.net/bug.php?id=45996).\n", + "PCRE $minimumPcreVersion or later is required.\n" . + "Your PHP binary is linked with PCRE $pcreVersion.\n\n" . + "More information:\n" . + "https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms/PCRE\n\n" . + "ABORTING.\n", true ); } - $test = new PhpRefCallBugTester; - $test->execute(); + $test = new PhpXmlBugTester(); if ( !$test->ok ) { - $ver = phpversion(); $this->error( - "PHP $ver is not compatible with MediaWiki due to a bug involving\n" . - "reference parameters to __call. Upgrade to PHP 5.3.2 or higher, or \n" . - "downgrade to PHP 5.3.0 to fix this.\n" . - "ABORTING (see http://bugs.php.net/bug.php?id=50394 for details)\n", + "Your system has a combination of PHP and libxml2 versions that is buggy\n" . + "and can cause hidden data corruption in MediaWiki and other web apps.\n" . + "Upgrade to libxml2 2.7.3 or later.\n" . + "ABORTING (see https://bugs.php.net/bug.php?id=45996).\n", true ); } }