X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FIEContentAnalyzer.php;h=c31a35278a81b2d7f605aed30227241e5a29e2a3;hb=e1ebc2de02efbaf9183a48359b0025b04de9c5e4;hp=fae06ad6f430598807a986ebd82813b7f52c009e;hpb=88066420004931111290ed42ce9ee8f6e3a76c90;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/IEContentAnalyzer.php b/includes/libs/IEContentAnalyzer.php index fae06ad6f4..c31a35278a 100644 --- a/includes/libs/IEContentAnalyzer.php +++ b/includes/libs/IEContentAnalyzer.php @@ -329,11 +329,11 @@ class IEContentAnalyzer { * Get the MIME types from getMimesFromData(), but convert the result from IE's * idiosyncratic private types into something other apps will understand. * - * @param $fileName String: the file name (unused at present) - * @param $chunk String: the first 256 bytes of the file - * @param $proposed String: the MIME type proposed by the server + * @param string $fileName the file name (unused at present) + * @param string $chunk the first 256 bytes of the file + * @param string $proposed the MIME type proposed by the server * - * @return Array: map of IE version to detected mime type + * @return Array: map of IE version to detected MIME type */ public function getRealMimesFromData( $fileName, $chunk, $proposed ) { $types = $this->getMimesFromData( $fileName, $chunk, $proposed ); @@ -367,11 +367,11 @@ class IEContentAnalyzer { /** * Get the untranslated MIME types for all known versions * - * @param $fileName String: the file name (unused at present) - * @param $chunk String: the first 256 bytes of the file - * @param $proposed String: the MIME type proposed by the server + * @param string $fileName the file name (unused at present) + * @param string $chunk the first 256 bytes of the file + * @param string $proposed the MIME type proposed by the server * - * @return Array: map of IE version to detected mime type + * @return Array: map of IE version to detected MIME type */ public function getMimesFromData( $fileName, $chunk, $proposed ) { $types = array(); @@ -712,8 +712,9 @@ class IEContentAnalyzer { $xbmMagic2 = '_width'; $xbmMagic3 = '_bits'; $binhexMagic = 'converted with BinHex'; + $chunkLength = strlen( $chunk ); - for ( $offset = 0; $offset < strlen( $chunk ); $offset++ ) { + for ( $offset = 0; $offset < $chunkLength; $offset++ ) { $curChar = $chunk[$offset]; if ( $curChar == "\x0a" ) { $counters['lf']++;