fix buildFromIterator with filesystem iterator in php 6

This commit is contained in:
Greg Beaver 2009-07-26 02:43:14 +00:00
parent 866e3bddcd
commit d46a947d23
2 changed files with 50 additions and 36 deletions

View File

@ -1669,7 +1669,21 @@ static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{
case SPL_FS_INFO:
case SPL_FS_FILE:
#if PHP_VERSION_ID >= 60000
fname = expand_filepath(intern->file_name.s, NULL TSRMLS_CC);
if (intern->file_name_type == IS_UNICODE) {
zval zv;
INIT_ZVAL(zv);
Z_UNIVAL(zv) = intern->file_name;
Z_UNILEN(zv) = intern->file_name_len;
Z_TYPE(zv) = IS_UNICODE;
zval_copy_ctor(&zv);
zval_unicode_to_string(&zv TSRMLS_CC);
fname = expand_filepath(Z_STRVAL(zv), NULL TSRMLS_CC);
ezfree(Z_UNIVAL(zv));
} else {
fname = expand_filepath(intern->file_name.s, NULL TSRMLS_CC);
}
#else
fname = expand_filepath(intern->file_name, NULL TSRMLS_CC);
#endif

View File

@ -31,74 +31,74 @@ __HALT_COMPILER();
--EXPECTF--
array(35) {
["phar_ctx_001.phpt"]=>
%unicode|string%(%d) "%sphar_ctx_001.phpt"
string(%d) "%sphar_ctx_001.phpt"
["phar_get_supported_signatures_001.phpt"]=>
%unicode|string%(%d) "%sphar_get_supported_signatures_001.phpt"
string(%d) "%sphar_get_supported_signatures_001.phpt"
["phar_get_supported_signatures_002.phpt"]=>
%unicode|string%(%d) "%sphar_get_supported_signatures_002.phpt"
string(%d) "%sphar_get_supported_signatures_002.phpt"
["phar_oo_001.phpt"]=>
%unicode|string%(%d) "%sphar_oo_001.phpt"
string(%d) "%sphar_oo_001.phpt"
["phar_oo_002.phpt"]=>
%unicode|string%(%d) "%sphar_oo_002.phpt"
string(%d) "%sphar_oo_002.phpt"
["phar_oo_003.phpt"]=>
%unicode|string%(%d) "%sphar_oo_003.phpt"
string(%d) "%sphar_oo_003.phpt"
["phar_oo_004.phpt"]=>
%unicode|string%(%d) "%sphar_oo_004.phpt"
string(%d) "%sphar_oo_004.phpt"
["phar_oo_005.phpt"]=>
%unicode|string%(%d) "%sphar_oo_005.phpt"
string(%d) "%sphar_oo_005.phpt"
["phar_oo_006.phpt"]=>
%unicode|string%(%d) "%sphar_oo_006.phpt"
string(%d) "%sphar_oo_006.phpt"
["phar_oo_007.phpt"]=>
%unicode|string%(%d) "%sphar_oo_007.phpt"
string(%d) "%sphar_oo_007.phpt"
["phar_oo_008.phpt"]=>
%unicode|string%(%d) "%sphar_oo_008.phpt"
string(%d) "%sphar_oo_008.phpt"
["phar_oo_009.phpt"]=>
%unicode|string%(%d) "%sphar_oo_009.phpt"
string(%d) "%sphar_oo_009.phpt"
["phar_oo_010.phpt"]=>
%unicode|string%(%d) "%sphar_oo_010.phpt"
string(%d) "%sphar_oo_010.phpt"
["phar_oo_011.phpt"]=>
%unicode|string%(%d) "%sphar_oo_011.phpt"
string(%d) "%sphar_oo_011.phpt"
["phar_oo_012.phpt"]=>
%unicode|string%(%d) "%sphar_oo_012.phpt"
string(%d) "%sphar_oo_012.phpt"
["phar_oo_compressed_001.phpt"]=>
%unicode|string%(%d) "%sphar_oo_compressed_001.phpt"
string(%d) "%sphar_oo_compressed_001.phpt"
["phar_oo_compressed_002.phpt"]=>
%unicode|string%(%d) "%sphar_oo_compressed_002.phpt"
string(%d) "%sphar_oo_compressed_002.phpt"
["phpinfo_001.phpt"]=>
%unicode|string%(%d) "%sphpinfo_001.phpt"
string(%d) "%sphpinfo_001.phpt"
["phpinfo_002.phpt"]=>
%unicode|string%(%d) "%sphpinfo_002.phpt"
string(%d) "%sphpinfo_002.phpt"
["phpinfo_003.phpt"]=>
%unicode|string%(%d) "%sphpinfo_003.phpt"
string(%d) "%sphpinfo_003.phpt"
["phpinfo_004.phpt"]=>
%unicode|string%(%d) "%sphpinfo_004.phpt"
string(%d) "%sphpinfo_004.phpt"
["tar/tar_001.phpt"]=>
%unicode|string%(%d) "%star%ctar_001.phpt"
string(%d) "%star%ctar_001.phpt"
["tar/tar_002.phpt"]=>
%unicode|string%(%d) "%star%ctar_002.phpt"
string(%d) "%star%ctar_002.phpt"
["tar/tar_003.phpt"]=>
%unicode|string%(%d) "%star%ctar_003.phpt"
string(%d) "%star%ctar_003.phpt"
["tar/tar_004.phpt"]=>
%unicode|string%(%d) "%star%ctar_004.phpt"
string(%d) "%star%ctar_004.phpt"
["zip/corrupt_001.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_001.phpt"
string(%d) "%szip%ccorrupt_001.phpt"
["zip/corrupt_002.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_002.phpt"
string(%d) "%szip%ccorrupt_002.phpt"
["zip/corrupt_003.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_003.phpt"
string(%d) "%szip%ccorrupt_003.phpt"
["zip/corrupt_004.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_004.phpt"
string(%d) "%szip%ccorrupt_004.phpt"
["zip/corrupt_005.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_005.phpt"
string(%d) "%szip%ccorrupt_005.phpt"
["zip/corrupt_006.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_006.phpt"
string(%d) "%szip%ccorrupt_006.phpt"
["zip/corrupt_007.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_007.phpt"
string(%d) "%szip%ccorrupt_007.phpt"
["zip/corrupt_008.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_008.phpt"
string(%d) "%szip%ccorrupt_008.phpt"
["zip/corrupt_009.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_009.phpt"
string(%d) "%szip%ccorrupt_009.phpt"
["zip/corrupt_010.phpt"]=>
%unicode|string%(%d) "%szip%ccorrupt_010.phpt"
string(%d) "%szip%ccorrupt_010.phpt"
}
===DONE===