mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-09 13:09:33 -04:00
Don't do ORM::factory() lookups on non-ints (thanks Romain LE DISEZ)
This commit is contained in:
@@ -81,7 +81,7 @@ class REST_Controller extends Controller {
|
||||
return $this->_index();
|
||||
}
|
||||
|
||||
$resource = ORM::factory($this->resource_type, $function);
|
||||
$resource = ORM::factory($this->resource_type, (int)$function);
|
||||
if (!$resource->loaded && $request_method != "post") {
|
||||
return Kohana::show_404();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user