fixed two notices which lead to corrupt zip archives

This commit is contained in:
Thomas Keller 2010-11-09 00:11:27 +00:00
parent 8993d2988b
commit d08fee129b

View File

@ -407,7 +407,7 @@ class ZipStream {
list ($name, $opt, $meth, $crc, $zlen, $len, $ofs) = $args; list ($name, $opt, $meth, $crc, $zlen, $len, $ofs) = $args;
# get attributes # get attributes
$comment = $opt['comment'] ? $opt['comment'] : ''; $comment = isset($opt['comment']) ? $opt['comment'] : '';
# get dos timestamp # get dos timestamp
$dts = $this->dostime($opt['time']); $dts = $this->dostime($opt['time']);
@ -450,7 +450,7 @@ class ZipStream {
# grab comment (if specified) # grab comment (if specified)
$comment = ''; $comment = '';
if ($opt && $opt['comment']) if ($opt && isset($opt['comment']))
$comment = $opt['comment']; $comment = $opt['comment'];
$fields = array( # (from V,F of APPNOTE.TXT) $fields = array( # (from V,F of APPNOTE.TXT)