Don't do ORM::factory() lookups on non-ints (thanks Romain LE DISEZ)

This commit is contained in:
Bharat Mediratta
2009-05-08 19:01:45 +00:00
parent 764f88defb
commit bf3282cb3c

View File

@@ -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();
}