Skip to content

Commit f96d9ab

Browse files
Merge pull request chriskacerguis#649 from todstoychev/patch-1
Response code changed
2 parents dd5a06d + b9ba4fc commit f96d9ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/libraries/REST_Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,12 +660,12 @@ public function _remap($object_called, $arguments = [])
660660
}
661661

662662
// Sure it exists, but can they do anything with it?
663-
if (method_exists($this, $controller_method) === FALSE)
663+
if (!method_exists($this, $controller_method))
664664
{
665665
$this->response([
666666
$this->config->item('rest_status_field_name') => FALSE,
667667
$this->config->item('rest_message_field_name') => $this->lang->line('text_rest_unknown_method')
668-
], self::HTTP_NOT_FOUND);
668+
], self::HTTP_METHOD_NOT_ALLOWED);
669669
}
670670

671671
// Doing key related stuff? Can only do it if they have a key right?

0 commit comments

Comments
 (0)