Browse Source

Merge pull request #1260 from DiegoMax/2.4

Patched CakeResponse's MapType() to increase performance by reducing hun...
Mark Story 13 years ago
parent
commit
6b0ea6ac76
1 changed files with 1 additions and 3 deletions
  1. 1 3
      lib/Cake/Network/CakeResponse.php

+ 1 - 3
lib/Cake/Network/CakeResponse.php

@@ -717,9 +717,7 @@ class CakeResponse {
 		}
 
 		foreach ($this->_mimeTypes as $alias => $types) {
-			if (is_array($types) && in_array($ctype, $types)) {
-				return $alias;
-			} elseif (is_string($types) && $types == $ctype) {
+			if (in_array($ctype, (array)$types)) {
 				return $alias;
 			}
 		}