From ef13383c289a497e75b06589e4845ec6d6230ee7 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Fri, 17 Oct 2014 11:51:36 -0300 Subject: [PATCH] Fix bug where source_dsid of NULL wouldn't trigger all derivs. --- includes/derivatives.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/derivatives.inc b/includes/derivatives.inc index 72d61235..cc37bab6 100644 --- a/includes/derivatives.inc +++ b/includes/derivatives.inc @@ -213,7 +213,7 @@ function islandora_do_batch_derivatives(AbstractObject $object, array $options) * Returns the filtered array of hooks to be ran. */ function islandora_filter_derivatives($hooks, $options, AbstractObject $object) { - if (array_key_exists('source_dsid', $options)) { + if (array_key_exists('source_dsid', $options) && $options['source_dsid'] !== NULL) { $hooks = array_filter($hooks, function ($filter_hook) use ($options) { return array_key_exists('source_dsid', $filter_hook) && $filter_hook['source_dsid'] == $options['source_dsid'];