From 0fa2d5d4543376065fb24a563438ec843cb80d00 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Mon, 9 Dec 2013 02:35:09 +0100 Subject: [PATCH] Prevent fatal error when using a batch within a multistep form. --- includes/tuque_wrapper.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 2aa85a8b..98e9c62c 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -8,7 +8,11 @@ * @todo Overload functions and apply pre/post hooks. */ -$islandora_module_path = drupal_get_path('module', 'islandora'); +// This function may not exist when a batch operation is running from a +// multistep form. +if (function_exists('drupal_get_path')) { + $islandora_module_path = drupal_get_path('module', 'islandora'); +} // @todo this until we expost these in a module or library @include_once 'sites/all/libraries/tuque/Datastream.php';