From 46d2413c69d23d48ac29d431cf234f9fb462f297 Mon Sep 17 00:00:00 2001 From: Vladimir Zbrailov Date: Mon, 10 Mar 2014 00:33:41 +0400 Subject: [PATCH] fix buildin php bug https://bugs.php.net/bug.php?id=66606 --- framework/web/Request.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/web/Request.php b/framework/web/Request.php index 0f9a211..e8d69d6 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -956,7 +956,12 @@ class Request extends \yii\base\Request */ public function getContentType() { - return isset($_SERVER["CONTENT_TYPE"]) ? $_SERVER["CONTENT_TYPE"] : null; + if (isset($_SERVER["CONTENT_TYPE"])) { + return $_SERVER["CONTENT_TYPE"]; + } elseif (isset($_SERVER["HTTP_CONTENT_TYPE"])) { + return $_SERVER["HTTP_CONTENT_TYPE"]; + } + return null; } private $_languages;