diff --git a/controllers/ItemsController.php b/controllers/ItemsController.php index d3a6e4894..9c997911f 100644 --- a/controllers/ItemsController.php +++ b/controllers/ItemsController.php @@ -269,6 +269,10 @@ public function items() { else { $this->allowMethods(array('HEAD', 'GET', 'POST', 'DELETE')); + if (!$this->objectLibraryID){ + $this->e404(); + } + // Check for general library access if (!$this->publications && !$this->permissions->canAccess($this->objectLibraryID)) { $this->e403();