ISLANDORA-317: fixed by checking the stuff.
@ -752,6 +752,10 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
return '';
}
if ($pid == NULL) {
$pid = variable_get('fedora_repository_pid', 'islandora:top');
$item = new fedora_item($pid);
if (!$item->exists()) {
drupal_not_found();