From: Raphaël Barrois Date: Tue, 16 Mar 2010 11:13:35 +0000 (+0100) Subject: Fixes detection of a "single" callback given to PlParallelIterator X-Git-Tag: core/1.1.0~39 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ff539a07a4f86dbb19f43afb190102bdd8d8cf95;p=platal.git Fixes detection of a "single" callback given to PlParallelIterator Signed-off-by: Raphaël Barrois --- 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();