aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpabs <pabs@pablotron.org>2007-08-22 23:04:39 -0400
committerpabs <pabs@pablotron.org>2007-08-22 23:04:39 -0400
commitf7dcea76f55a3e04284045147b855ba34a34b0cd (patch)
tree92e557069096ed03357c4a8d9963aedae00c7d50
parent0e0e37b8052c8893a82eb4c9671242a1f5a3221e (diff)
downloadzipstream-php-f7dcea76f55a3e04284045147b855ba34a34b0cd.tar.bz2
zipstream-php-f7dcea76f55a3e04284045147b855ba34a34b0cd.zip
fix call_user_func_array() in pack_fields().
-rw-r--r--zipstream.php5
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);
}
};