MultiHttpClient: Replace PHP version check with defined()
Bug: T285287 Change-Id: I3dfef3f0a13bc8a5ec54912976f23c0c497149a7
This commit is contained in:
parent
0bac9e78f4
commit
b1b6afd53f
1 changed files with 1 additions and 1 deletions
|
|
@ -477,7 +477,7 @@ class MultiHttpClient implements LoggerAwareInterface {
|
|||
* @return string
|
||||
*/
|
||||
private function getCurlTime( $ch, $oldOption, $newConstName ): string {
|
||||
if ( version_compare( PHP_VERSION, '7.3.0', '>=' ) ) {
|
||||
if ( defined( $newConstName ) ) {
|
||||
return sprintf( "%.6f", curl_getinfo( $ch, constant( $newConstName ) ) / 1e6 );
|
||||
} else {
|
||||
return (string)curl_getinfo( $ch, $oldOption );
|
||||
|
|
|
|||
Loading…
Reference in a new issue