X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FLocalRepo.php;h=8e3355c8c6147ee2efb3654146fbbc31599894e9;hb=4e9300e2beb07c40f0c7d5f63323c498a0331800;hp=5ed937f581d364ba25eb592deba199a01e54f832;hpb=5264862bc1224fbb2eec487155aa0253af1fa777;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index 5ed937f581..8e3355c8c6 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -180,7 +180,11 @@ class LocalRepo extends FileRepo { * @return string */ public static function getHashFromKey( $key ) { - return strtok( $key, '.' ); + $sha1 = strtok( $key, '.' ); + if ( is_string( $sha1 ) && strlen( $sha1 ) === 32 && $sha1[0] === '0' ) { + $sha1 = substr( $sha1, 1 ); + } + return $sha1; } /**