awhitney42/codeigniter-restserver-resources

there is a bug at your delete method handler

Opened this issue · 0 comments

It seems that you are not parsing post parameters in delete.
The solution I found is the following:
in:
protected function _parse_delete(){
parse_str(file_get_contents('php://input'), $this->_delete_args);
}
change for :
protected function _parse_delete(){
if ($this->request->format)
{
$this->request->body = file_get_contents('php://input');
}
else
{
parse_str(file_get_contents('php://input'), $this->_delete_args);
}
}

I think that this solves the problem.

Thanks for the library.