diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /includes/libs/IEContentAnalyzer.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/libs/IEContentAnalyzer.php')
-rw-r--r-- | includes/libs/IEContentAnalyzer.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/libs/IEContentAnalyzer.php b/includes/libs/IEContentAnalyzer.php index 7f461a03..c31a3527 100644 --- a/includes/libs/IEContentAnalyzer.php +++ b/includes/libs/IEContentAnalyzer.php @@ -333,7 +333,7 @@ class IEContentAnalyzer { * @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 ); @@ -371,7 +371,7 @@ class IEContentAnalyzer { * @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']++; |