summaryrefslogtreecommitdiff
path: root/maintenance/update.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-02-01 21:35:16 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-02-01 21:35:16 -0500
commit064cec79ca4c8201de0d06bbca6cb7a5345d11be (patch)
tree1d2221b7d5fe2744d82d1241a736a9d9b0666ded /maintenance/update.php
parent5744df39e15f85c6cc8a9faf8924d77e76d2b216 (diff)
parent1b65fa2a5f4c48b02ceda934e9c1aee2d03ce453 (diff)
Merge branch 'archwiki'
Diffstat (limited to 'maintenance/update.php')
-rw-r--r--maintenance/update.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/maintenance/update.php b/maintenance/update.php
index 378217fd..19429716 100644
--- a/maintenance/update.php
+++ b/maintenance/update.php
@@ -57,6 +57,20 @@ class UpdateMediaWiki extends Maintenance {
}
function compatChecks() {
+ // Avoid syntax error in PHP4
+ $minimumPcreVersion = constant( 'Installer::MINIMUM_PCRE_VERSION' );
+
+ list( $pcreVersion ) = explode( ' ', PCRE_VERSION, 2 );
+ if ( version_compare( $pcreVersion, $minimumPcreVersion, '<' ) ) {
+ $this->error(
+ "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 PhpXmlBugTester();
if ( !$test->ok ) {
$this->error(