From d08fee129b9d90efb667d7b9831e1f18d95a85ff Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 9 Nov 2010 00:11:27 +0000 Subject: [PATCH] fixed two notices which lead to corrupt zip archives --- contrib/zipstream-php-0.2.2/zipstream.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/zipstream-php-0.2.2/zipstream.php b/contrib/zipstream-php-0.2.2/zipstream.php index 37a6046..7d821c7 100644 --- a/contrib/zipstream-php-0.2.2/zipstream.php +++ b/contrib/zipstream-php-0.2.2/zipstream.php @@ -407,7 +407,7 @@ class ZipStream { list ($name, $opt, $meth, $crc, $zlen, $len, $ofs) = $args; # get attributes - $comment = $opt['comment'] ? $opt['comment'] : ''; + $comment = isset($opt['comment']) ? $opt['comment'] : ''; # get dos timestamp $dts = $this->dostime($opt['time']); @@ -450,7 +450,7 @@ class ZipStream { # grab comment (if specified) $comment = ''; - if ($opt && $opt['comment']) + if ($opt && isset($opt['comment'])) $comment = $opt['comment']; $fields = array( # (from V,F of APPNOTE.TXT)