From a24194d704102437f28a794f26070ca43a7a7bf1 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Thu, 13 Jun 2019 18:36:14 -0700 Subject: [PATCH] PHPVersionCheck: remove version_compare() existence check It was added to PHP in 2001. Change-Id: I3b14d726aa1cefd6b64e4bac39ef489b3c79ac1a --- includes/PHPVersionCheck.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php index 2d9216dfaa..b63a84d807 100644 --- a/includes/PHPVersionCheck.php +++ b/includes/PHPVersionCheck.php @@ -123,10 +123,7 @@ class PHPVersionCheck { $phpInfo = $this->getPHPInfo(); $minimumVersion = $phpInfo['minSupported']; $otherInfo = $this->getPHPInfo( $phpInfo['implementation'] === 'HHVM' ? 'PHP' : 'HHVM' ); - if ( - !function_exists( 'version_compare' ) - || version_compare( $phpInfo['version'], $minimumVersion ) < 0 - ) { + if ( version_compare( $phpInfo['version'], $minimumVersion ) < 0 ) { $shortText = "MediaWiki $this->mwVersion requires at least {$phpInfo['implementation']}" . " version $minimumVersion or {$otherInfo['implementation']} version " . "{$otherInfo['minSupported']}, you are using {$phpInfo['implementation']} " -- 2.20.1