diff options
Diffstat (limited to 'lib/Minz/Request.php')
| -rw-r--r-- | lib/Minz/Request.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index 232479191..08a5e9053 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -415,7 +415,7 @@ class Minz_Request { * @return string */ private static function extractContentType() { - return strtolower(trim(static::getHeader('CONTENT_TYPE'))); + return strtolower(trim(static::getHeader('CONTENT_TYPE', ''))); } /** @@ -454,7 +454,7 @@ class Minz_Request { * @return array */ public static function getPreferredLanguages() { - if (preg_match_all('/(^|,)\s*(?P<lang>[^;,]+)/', static::getHeader('HTTP_ACCEPT_LANGUAGE'), $matches)) { + if (preg_match_all('/(^|,)\s*(?P<lang>[^;,]+)/', static::getHeader('HTTP_ACCEPT_LANGUAGE', ''), $matches)) { return $matches['lang']; } return array('en'); |
