From fcb2bf280573ef275c8004eb2a91490c9ff9d095 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Tue, 27 Aug 2013 23:41:57 +0200 Subject: [PATCH] Prevents a white screen when a viewer is set but not enabled. If a user selects a viewer and then disables that module, but does not change any solution packs viewers settings this can occur. --- includes/solution_packs.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index a80c41a5..7cf0351a 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -745,7 +745,9 @@ function islandora_get_viewer($params = NULL, $variable_id = NULL, $fedora_objec $viewer_id = islandora_get_viewer_id($variable_id); if ($viewer_id AND $params !== NULL) { $callback = islandora_get_viewer_callback($viewer_id); - return $callback($params, $fedora_object); + if (function_exists($callback)) { + return $callback($params, $fedora_object); + } } } return FALSE;