Fixes detection of a "single" callback given to PlParallelIterator
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Tue, 16 Mar 2010 11:13:35 +0000 (12:13 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Tue, 16 Mar 2010 11:14:27 +0000 (12:14 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/pliteratorutils.php

index 230dc5a..930cc56 100644 (file)
@@ -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();