Use feature test rather than version check
authorNiklas Laxström <niklas.laxstrom@gmail.com>
Wed, 22 Jul 2015 19:43:17 +0000 (21:43 +0200)
committerNiklas Laxström <niklas.laxstrom@gmail.com>
Wed, 22 Jul 2015 19:43:17 +0000 (21:43 +0200)
Not sure why I didn't do this in the first place.

Bug: T106579
Change-Id: I238aedacd4f960ad4ca7549c232fd3a7eec3f02f

includes/libs/MultiHttpClient.php

index aa0cc46..2e7ef88 100644 (file)
@@ -228,7 +228,7 @@ class MultiHttpClient {
                        if ( $errno !== 0 ) {
                                $req['response']['error'] = "(curl error: $errno)";
 
-                               if ( version_compare( PHP_VERSION, '5.5.0' ) >= 0 ) {
+                               if ( function_exists( 'curl_strerror' ) ) {
                                        $req['response']['error'] .= " " . curl_strerror( $errno );
                                }
                        }