summaryrefslogtreecommitdiff
path: root/modules/rest/controllers/rest.php
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-03-02 13:25:10 +0100
committershadlaws <shad@shadlaws.com>2013-03-02 13:25:10 +0100
commit9b9f1a7b07daecf2251770e4f49838f22cb58a2a (patch)
tree6d4306e8e9b4edbcba700a1910d6d0a03ce0edde /modules/rest/controllers/rest.php
parent0d05e91cd3c5050c25133c864f8b789f499d8e17 (diff)
#2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code - deleted previous Zend Guard Loader workaround in MY_Kohana.php - updated Bootstrap.php to reflect deleted MY_Kohana.php
Diffstat (limited to 'modules/rest/controllers/rest.php')
-rw-r--r--modules/rest/controllers/rest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php
index 54ca6fe9..b3d59e0f 100644
--- a/modules/rest/controllers/rest.php
+++ b/modules/rest/controllers/rest.php
@@ -98,7 +98,7 @@ class Rest_Controller extends Controller {
$handler_class = "{$function}_rest";
$handler_method = $request->method;
- if (!method_exists($handler_class, $handler_method)) {
+ if (!class_exists($handler_class) || !method_exists($handler_class, $handler_method)) {
throw new Rest_Exception("Bad Request", 400);
}