summaryrefslogtreecommitdiff
path: root/core/controllers/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/controllers/item.php')
-rw-r--r--core/controllers/item.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/controllers/item.php b/core/controllers/item.php
index 78ee7b0b..286eb66f 100644
--- a/core/controllers/item.php
+++ b/core/controllers/item.php
@@ -21,6 +21,10 @@ class Item_Controller extends REST_Controller {
protected $resource_type = "item";
public function _get($item) {
+ if (empty($item)) {
+ // A null item is not allowed for albums or photos.
+ return Kohana::show_404();
+ }
// Redirect to the more specific resource type, since it will render
// differently. We could also just delegate here, but it feels more appropriate
// to have a single canonical resource mapping.