forked from extern/egroupware
Add handling for in case the input data comes pre-parsed
This commit is contained in:
parent
9d4c60bc42
commit
a09a58ae11
@ -30,9 +30,17 @@ class egw_json_request
|
|||||||
$this->handleRequest($menuaction, array());
|
$this->handleRequest($menuaction, array());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(!is_array($input_data))
|
||||||
{
|
{
|
||||||
//Decode the JSON input data into associative arrays
|
//Decode the JSON input data into associative arrays
|
||||||
if (($json = json_decode(stripslashes($input_data[0]), true)))
|
$json = json_decode($input_data, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$json = $input_data;
|
||||||
|
}
|
||||||
|
if(is_array($json))
|
||||||
{
|
{
|
||||||
//Get the request array
|
//Get the request array
|
||||||
if (isset($json['request']))
|
if (isset($json['request']))
|
||||||
|
Loading…
Reference in New Issue
Block a user