stripos return value check

This commit is contained in:
Thomas Müller 2013-09-25 11:05:59 +02:00
parent b168d5aa3b
commit 30286c06ab
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class Server extends SimpleContainer implements IServerContainer {
$params = array();
// we json decode the body only in case of content type json
if (isset($_SERVER['CONTENT_TYPE']) && stripos($_SERVER['CONTENT_TYPE'],'json') === true ) {
if (isset($_SERVER['CONTENT_TYPE']) && stripos($_SERVER['CONTENT_TYPE'],'json') !== false ) {
$params = json_decode(file_get_contents('php://input'), true);
$params = is_array($params) ? $params: array();
}