diff --git a/includes/derivatives.inc b/includes/derivatives.inc index c66944b1..8a6627e5 100644 --- a/includes/derivatives.inc +++ b/includes/derivatives.inc @@ -60,9 +60,14 @@ function islandora_do_derivatives(AbstractObject $object, array $options) { require_once $hook['file']; } foreach ($hook['function'] as $function) { - $logging = call_user_func($function, $object, $options['force']); - if (!empty($logging)) { - $results[] = $logging; + if (function_exists($function)) { + $logging = call_user_func($function, $object, $options['force']); + if (!empty($logging)) { + $results[] = $logging; + } + } + else { + watchdog('islandora', 'Unable to call derivative function @function as it was not found!', array('@function' => $function), WATCHDOG_ERROR); } } } diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 96f9919c..2aa85a8b 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -207,6 +207,7 @@ class IslandoraFedoraApiM extends FedoraApiM { 'params' => $params, ); islandora_alter_datastream($object, $datastream, $context); + $params = $context['params']; if (isset($params['lastModifiedDate'])) { $params['lastModifiedDate'] = (string) $object[$dsid]->createdDate; } @@ -244,6 +245,7 @@ class IslandoraFedoraApiM extends FedoraApiM { 'params' => $params, ); islandora_alter_object($object, $context); + $params = $context['params']; try { if ($context['block']) { throw new Exception('Modify Object was blocked.');