From f4d1feb5310c4d288c0dc89117d43c9f2884130b Mon Sep 17 00:00:00 2001
From: manumanu <manumanu@46459.no-reply.drupal.org>
Date: Wed, 9 Jul 2014 16:08:30 +0200
Subject: [PATCH] replace function_exists by is_callable and use call_user_func

---
 includes/batch.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/batch.inc b/includes/batch.inc
index 061acd4..e89ab8d 100644
--- a/includes/batch.inc
+++ b/includes/batch.inc
@@ -460,10 +460,10 @@ function _batch_finished() {
       if (isset($batch_set['file']) && is_file($batch_set['file'])) {
         include_once DRUPAL_ROOT . '/' . $batch_set['file'];
       }
-      if (function_exists($batch_set['finished'])) {
+      if (is_callable($batch_set['finished'])) {
         $queue = _batch_queue($batch_set);
         $operations = $queue->getAllItems();
-        $batch_set['finished']($batch_set['success'], $batch_set['results'], $operations, format_interval($batch_set['elapsed'] / 1000));
+        call_user_func($batch_set['finished'], $batch_set['success'], $batch_set['results'], $operations, format_interval($batch_set['elapsed'] / 1000));
       }
     }
   }
-- 
2.0.0

