From 8b5b3866d7c44028c6895ae23b58f70c378e7d69 Mon Sep 17 00:00:00 2001
From: Roni Kantis <roni.kantis@gmail.com>
Date: Fri, 22 Feb 2013 11:09:32 +0200
Subject: [PATCH] Changed function_exists() to is_callable in batch API
 finished callback to support use of classes in batch
 operations.

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

diff --git a/includes/batch.inc b/includes/batch.inc
index 061acd4..f2b0430 100644
--- a/includes/batch.inc
+++ b/includes/batch.inc
@@ -460,7 +460,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

