From 672cd6a5502c46287325299fbec4158a3fb274f8 Mon Sep 17 00:00:00 2001
From: Roni Kantis <roni.kantis@gmail.com>
Date: Fri, 22 Feb 2013 10:41:10 +0200
Subject: [PATCH] Replaced function_exists() with is_callable in batch api
 'finished' callback check.

---
 core/includes/batch.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index ff0b4cb..07bc8ff 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -421,7 +421,7 @@ 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));
-- 
1.7.11.4

