From b11c78bf4b222c2d8934cfcc58b17ee95d70341b Mon Sep 17 00:00:00 2001 From: "Bryan J. Brown" Date: Thu, 5 Oct 2017 19:48:31 +0000 Subject: [PATCH] Adds check for invalid PIDs to islandora_object_load fails --- islandora.module | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index 29899c1b..c1fa89c7 100644 --- a/islandora.module +++ b/islandora.module @@ -1230,7 +1230,14 @@ function islandora_object_load($object_id) { return FALSE; } else { - return NULL; + 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 { + return NULL; + } } } }