mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Add handling for in case the input data comes pre-parsed
This commit is contained in:
parent
9d4c60bc42
commit
a09a58ae11
@ -31,8 +31,16 @@ class egw_json_request
|
||||
}
|
||||
else
|
||||
{
|
||||
//Decode the JSON input data into associative arrays
|
||||
if (($json = json_decode(stripslashes($input_data[0]), true)))
|
||||
if(!is_array($input_data))
|
||||
{
|
||||
//Decode the JSON input data into associative arrays
|
||||
$json = json_decode($input_data, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$json = $input_data;
|
||||
}
|
||||
if(is_array($json))
|
||||
{
|
||||
//Get the request array
|
||||
if (isset($json['request']))
|
||||
|
Loading…
Reference in New Issue
Block a user