-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: RESTful API
-
Labels:None
-
ToDo:
-
Asterisk Version:13.22
-
Distro Version:14.0.3.13
-
Distro:FreePBX Distro
Dear support,
member function _"get_req" of "Api" class in restapi/functions.inc/api.class.php has an issue concerning the initialization of $this->req->token_opts. This property is initially undefined and some subproperties, like "allow" and "deny", could be initialized to null triggering a "create default object from empty" exception in PHP 5.6.
Perhaps, it should be added a statement like this
$opts = restapi_tokens_get($this->req->token, 'token');
if ($opts) {
$this->req->token_opts = isset($this->req->token_opts) ? $this->req->token_opts : new stdClass;
foreach ($opts as $k => $v)
to fix this issue and avoiding the triggering of exception.
We make a deep use of RESTful API in our deployment and this bug prevents us from migrating to FreePBX 14.
Thank you in advance and best regards,
Camillo