Skip to content

Commit 7e1c22c

Browse files
yuyaunchriskacerguis
authored andcommitted
Fix parse method return arguments null (chriskacerguis#744)
* fix cross site to option request error cross site request first can use option http method. but use `keys` authentication, authentication can fail * Fix Parse error Fix parse method return arguments null
1 parent e1cbdc1 commit 7e1c22c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

application/libraries/REST_Controller.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,12 @@ public function __construct($config = 'rest')
475475
$this->request->body = NULL;
476476

477477
$this->{'_parse_' . $this->request->method}();
478+
479+
// Fix parse method return arguments null
480+
if($this->{'_'.$this->request->method.'_args'} === null)
481+
{
482+
$this->{'_'.$this->request->method.'_args'} = [];
483+
}
478484

479485
// Now we know all about our request, let's try and parse the body if it exists
480486
if ($this->request->format && $this->request->body)

0 commit comments

Comments
 (0)