X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Fvirtualrest%2FVirtualRESTServiceClient.php;h=96d79291697acfba9de70f07b906d056cd2ca034;hb=138298b397b308ad6e4bfc7088884d90e8ac1e37;hp=324933054a3cfb54f87a4c7b0a61070457b7ec70;hpb=440fe377d87ebb0a495d46ecba1fcc7f99209264;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/virtualrest/VirtualRESTServiceClient.php b/includes/libs/virtualrest/VirtualRESTServiceClient.php index 324933054a..96d7929169 100644 --- a/includes/libs/virtualrest/VirtualRESTServiceClient.php +++ b/includes/libs/virtualrest/VirtualRESTServiceClient.php @@ -40,7 +40,6 @@ * - stream : resource to stream the HTTP response body to * Request maps can use integer index 0 instead of 'method' and 1 instead of 'url'. * - * @author Aaron Schulz * @since 1.23 */ class VirtualRESTServiceClient { @@ -106,10 +105,7 @@ class VirtualRESTServiceClient { $cmpFunc = function ( $a, $b ) { $al = substr_count( $a, '/' ); $bl = substr_count( $b, '/' ); - if ( $al === $bl ) { - return 0; // should not actually happen - } - return ( $al < $bl ) ? 1 : -1; // largest prefix first + return $bl <=> $al; // largest prefix first }; $matches = []; // matching prefixes (mount points)