diff --git a/islandora.api.php b/islandora.api.php index 3f00bf57..e553a894 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -746,7 +746,7 @@ function hook_cmodel_pid_islandora_derivative() { /** * Allows for the altering of defined derivative functions. */ -function hook_islandora_derivative_alter(&$derivatives, AbstractObject $object, $ds_modified_params = array()) { +function hook_islandora_derivative_alter(&$derivatives, AbstractObject $object = NULL, $ds_modified_params = array()) { foreach ($derivatives as $key => $derivative) { if ($derivative['destination_dsid'] == 'TN') { unset($derivatives[$key]); diff --git a/tests/islandora_derivatives_test.module b/tests/islandora_derivatives_test.module index 4a46eb66..91ef8fef 100644 --- a/tests/islandora_derivatives_test.module +++ b/tests/islandora_derivatives_test.module @@ -48,7 +48,7 @@ function islandora_derivatives_test_some_cmodel_islandora_derivative() { /** * Implements hook_islandora_CMODEL_PID_derivative_alter(). */ -function islandora_derivatives_test_some_cmodel_islandora_derivative_alter(&$derivatives, AbstractObject $object, $ds_modified_params) { +function islandora_derivatives_test_some_cmodel_islandora_derivative_alter(&$derivatives, AbstractObject $object = NULL, $ds_modified_params = array()) { // Use a mask to determine if only the label has been modified. $diff = array_diff_key($ds_modified_params, array( 'label' => NULL,