Bug #53603 [NEW]: ZipArchive should quiet stat errors

From: Date: Fri, 24 Dec 2010 09:06:27 +0000
Subject: Bug #53603 [NEW]: ZipArchive should quiet stat errors
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157296@lists.php.net to get a copy of this message
From:             
Operating system: OS X 10.6
PHP version:      5.3.4
Package:          Zip Related
Bug Type:         Bug
Bug description:ZipArchive should quiet stat errors

Description:
------------
ZipArchive::php_zip_extract_file and ZipArchive::extractTo call 
php_stream_stat_path to determine if a specific directory exists.  Since it

doesn't set STREAM_URL_STAT_QUIET, warnings may be emitted in the stream's

implementation of url_stat.  Because we are only checking for the existence
of a 
directory, these warnings should be silenced.


Test script:
---------------
See http://drupal.org/node/1006302#comment-3864102

Warnings are emitted in a stream's implementation of url_stat when called
from ZipArchive::extractTo.

Expected result:
----------------
No warnings should appear.

Actual result:
--------------
Backtrace of PHP warnings.  Only the two calls are shown.
Array
(
    [function] => url_stat
    [class] => DrupalLocalStreamWrapper
    [object] => DrupalTemporaryStreamWrapper Object
        (
            [context] => 
            [handle] => 
            [uri:protected] => temporary://update-extraction/apachesolr/
        )

    [type] => ->
    [args] => Array
        (
            [0] => temporary://update-extraction/apachesolr/
            [1] => 0
        )

)
Array
(
    [file] => 
/Applications/MAMP/htdocs/drupal/modules/system/system.archiver.inc
    [line] => 113
    [function] => extractTo
    [class] => ZipArchive
    [object] => ZipArchive Object
        (
            [status] => 0
            [statusSys] => 0
            [numFiles] => 41
            [filename] =>
/Applications/MAMP/tmp/php/update-cache/apachesolr-
7.x-1.x-dev.zip
            [comment] => 
        )

    [type] => ->
    [args] => Array
        (
            [0] => temporary://update-extraction
        )

)


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53603&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=53603&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=53603&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=53603&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=53603&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53603&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=53603&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=53603&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=53603&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=53603&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=53603&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=53603&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=53603&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=53603&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=53603&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53603&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53603&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=53603&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=53603&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=53603&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=53603&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=53603&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#157296) next »