From ff539a07a4f86dbb19f43afb190102bdd8d8cf95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 16 Mar 2010 12:13:35 +0100 Subject: [PATCH] Fixes detection of a "single" callback given to PlParallelIterator MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/pliteratorutils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/pliteratorutils.php b/classes/pliteratorutils.php index 230dc5a..930cc56 100644 --- a/classes/pliteratorutils.php +++ b/classes/pliteratorutils.php @@ -645,7 +645,8 @@ class PlParallelIterator implements PlIterator $this->ids = array_keys($iterators); - if (is_array($callbacks)) { + $v = array_values($callbacks); + if (is_array($v[0])) { $this->callbacks = $callbacks; } else { $this->callbacks = array(); -- 2.1.4