Fix in Restler malformed json is valid in class JsonFormat and not valid in other class
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace Maveriks\Extension;
|
||||
|
||||
use Luracast\Restler\Defaults;
|
||||
use Luracast\Restler\Format\JsonFormat;
|
||||
use Luracast\Restler\Format\UrlEncodedFormat;
|
||||
use ProcessMaker\Services\Api;
|
||||
use Luracast\Restler\RestException;
|
||||
@@ -102,7 +103,7 @@ class Restler extends \Luracast\Restler\Restler
|
||||
} else {
|
||||
$r = $this->inputExecute;
|
||||
}
|
||||
if(!empty($r)){
|
||||
if(!empty($r) || !$this->requestFormat instanceof JsonFormat){
|
||||
$r = $this->requestFormat->decode($r);
|
||||
}
|
||||
$r = is_array($r)
|
||||
|
||||
Reference in New Issue
Block a user