From: Max Semenik Date: Fri, 14 Jun 2019 01:36:14 +0000 (-0700) Subject: PHPVersionCheck: remove version_compare() existence check X-Git-Tag: 1.34.0-rc.0~1393^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=a24194d704102437f28a794f26070ca43a7a7bf1;p=lhc%2Fweb%2Fwiklou.git PHPVersionCheck: remove version_compare() existence check It was added to PHP in 2001. Change-Id: I3b14d726aa1cefd6b64e4bac39ef489b3c79ac1a --- 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']} "