Skip to content
Snippets Groups Projects
Commit 30286c06 authored by Thomas Müller's avatar Thomas Müller
Browse files

stripos return value check

parent b168d5aa
Branches
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment