Fix reading stream in combine wrapper
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 28 Oct 2009 18:45:00 +0000 (12:45 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 28 Oct 2009 18:45:00 +0000 (12:45 -0600)
framework/Stream_Wrapper/lib/Horde/Stream/Wrapper/Combine.php

index d3670c3..a44545b 100644 (file)
@@ -135,10 +135,12 @@ class Horde_Stream_Wrapper_Combine
                 } else {
                     $tmp['p'] += $curr_read;
                 }
-            } else {
+            } elseif ($count) {
                 $tmp = &$this->_data[++$this->_datapos];
                 rewind($tmp['fp']);
                 $tmp['p'] = 0;
+            } else {
+                $tmp['p'] += $curr_read;
             }
         }