From fd366c908e620434a348186b80a5effb3ac49261 Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 28 Jun 2015 02:03:48 +0100 Subject: [PATCH] Remove a few more PHP4-isms from update.php Change-Id: I98f12f3b4ff11341839202311f492f1a8cca2882 --- maintenance/update.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/maintenance/update.php b/maintenance/update.php index 3bb722e486..452b53cd7d 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -4,7 +4,6 @@ * Run all updaters. * * This is used when the database schema is modified and we need to apply patches. - * It is kept compatible with php 4 parsing so that it can give out a meaningful error. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,8 +61,7 @@ class UpdateMediaWiki extends Maintenance { } function compatChecks() { - // Avoid syntax error in PHP4 - $minimumPcreVersion = constant( 'Installer::MINIMUM_PCRE_VERSION' ); + $minimumPcreVersion = Installer::MINIMUM_PCRE_VERSION; list( $pcreVersion ) = explode( ' ', PCRE_VERSION, 2 ); if ( version_compare( $pcreVersion, $minimumPcreVersion, '<' ) ) { @@ -174,7 +172,7 @@ class UpdateMediaWiki extends Maintenance { $child = $this->runChild( $maint ); // LoggedUpdateMaintenance is checking the updatelog itself - $isLoggedUpdate = is_a( $child, 'LoggedUpdateMaintenance' ); + $isLoggedUpdate = $child instanceof LoggedUpdateMaintenance; if ( !$isLoggedUpdate && $updater->updateRowExists( $maint ) ) { continue; -- 2.20.1