diff options
-rw-r--r-- | zipstream.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zipstream.php b/zipstream.php index eb0a33c..36df012 100644 --- a/zipstream.php +++ b/zipstream.php @@ -193,8 +193,9 @@ class ZipStream { } function pack_fields($fields) { - # populate format string and argument list list ($fmt, $args) = array('', array()); + + # populate format string and argument list foreach ($fields as $field) { $fmt .= $field[0]; $args[] = $field[1]; @@ -204,7 +205,7 @@ class ZipStream { array_unshift($args, $fmt); # build output string from header and compressed data - return call_user_func('pack', $args); + return call_user_func_array('pack', $args); } }; |