Browse Source

Adds check for invalid PIDs to islandora_object_load fails

pull/689/head
Bryan J. Brown 8 years ago
parent
commit
b11c78bf4b
  1. 7
      islandora.module

7
islandora.module

@ -1229,11 +1229,18 @@ function islandora_object_load($object_id) {
if ($e->getCode() == '404') { if ($e->getCode() == '404') {
return FALSE; return FALSE;
} }
else {
module_load_include('inc', 'islandora', 'includes/utilities');
if (!islandora_is_valid_pid($object_id)) {
watchdog('islandora', 'Failed to load invalid PID: @pid', array('@pid' => $object_id), WATCHDOG_ERROR);
return FALSE;
}
else { else {
return NULL; return NULL;
} }
} }
} }
}
else { else {
IslandoraTuque::getError(); IslandoraTuque::getError();
} }

Loading…
Cancel
Save