check content type before parse json data

This commit is contained in:
Yuri Kuznetsov
2014-04-03 16:20:24 +03:00
parent 0219a5d7db
commit 005c03bcfd
+2 -2
View File
@@ -64,8 +64,8 @@ class ControllerManager
$controllerClassName = '\\Espo\\Controllers\\' . Util::normilizeClassName($controllerName);
}
}
if ($data) {
if ($data && $request->getContentType() == 'application/json') {
$data = json_decode($data);
}