* @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 );
* @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();
$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']++;