From: Pierre Joye Date: Wed, 7 Sep 2011 12:33:22 +0000 (+0000) Subject: - reject paths with trainling spaces using the very good new zend arg X-Git-Tag: php-5.5.0alpha1~1234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b4717da8e0477030c9f7d0bb82032128f90347b;p=php - reject paths with trainling spaces using the very good new zend arg --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 5401483db7..c83b3d0f0e 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -438,6 +438,14 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, const cha if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) { return "a valid path"; } +#ifdef PHP_WIN32 + if (c == 'p') { + /* do not allow trailing space (or single, */ + if (Z_STRVAL_PP(arg)[0] == ' ' || Z_STRVAL_PP(arg)[Z_STRLEN_PP(arg) - 1] == ' ') { + return "a valid path"; + } + } +#endif break; case IS_OBJECT: diff --git a/ext/standard/tests/file/005_variation2-win32.phpt b/ext/standard/tests/file/005_variation2-win32.phpt index 45dcbc5f07..3ae129ba75 100644 --- a/ext/standard/tests/file/005_variation2-win32.phpt +++ b/ext/standard/tests/file/005_variation2-win32.phpt @@ -87,13 +87,13 @@ echo "Done"; -- File ' ' -- -- File access time is => -Warning: fileatime(): stat failed for in %s on line %d +Warning: fileatime() expects parameter 1 to be a valid path, string given in %s on line %d -- File modification time is => -Warning: filemtime(): stat failed for in %s on line %d +Warning: filemtime() expects parameter 1 to be a valid path, string given in %s on line %d -- inode change time is => -Warning: filectime(): stat failed for in %s on line %d +Warning: filectime() expects parameter 1 to be a valid path, string given in %s on line %d -- File '|' -- @@ -107,19 +107,13 @@ Warning: filemtime(): stat failed for | in %s on line %d Warning: filectime(): stat failed for | in %s on line %d -*** testing touch *** -Warning: touch(): %s in %s on line %d +*** testing touch ***bool(false) bool(false) - -Warning: touch(): %s in %s on line %d -bool(false) - -Warning: touch(): %s in %s on line %d bool(false) -Warning: touch(): %s in %s on line %d -bool(false) +Warning: touch() expects parameter 1 to be a valid path, string given in %s005_variation2-win32.php on line %d +NULL -Warning: touch(): %s in %s on line %d +Warning: touch(): Unable to create file | because Invalid argument in %s005_variation2-win32.php on line %d bool(false) Done diff --git a/ext/standard/tests/file/copy_variation3-win32.phpt b/ext/standard/tests/file/copy_variation3-win32.phpt index 68ce4a1680..3972523778 100644 --- a/ext/standard/tests/file/copy_variation3-win32.phpt +++ b/ext/standard/tests/file/copy_variation3-win32.phpt @@ -89,21 +89,29 @@ Size of source file => int(1500) Size of destination file => int(1500) -- Iteration 2 -- -Copy operation => bool(true) -Existence of destination file => bool(true) -Destination file name => copy_variation3.tmp -Size of source file => int(1500) -Size of destination file => int(1500) +Copy operation => +Warning: copy() expects parameter 2 to be a valid path, string given in %scopy_variation3-win32.php on line %d +NULL +Existence of destination file => +Warning: file_exists() expects parameter 1 to be a valid path, string given in %scopy_variation3-win32.php on line %d +NULL + +Warning: file_exists() expects parameter 1 to be a valid path, string given in %scopy_variation3-win32.php on line %d -- Iteration 3 -- Copy operation => -Warning: copy(%s): %s +Warning: copy(copy variation3.tmp): failed to open stream: Invalid argument in %scopy_variation3-win32.php on line %d bool(false) Existence of destination file => bool(false) -- Iteration 4 -- Copy operation => -Warning: copy(%s): %s -bool(false) -Existence of destination file => bool(false) +Warning: copy() expects parameter 2 to be a valid path, string given in %scopy_variation3-win32.php on line %d +NULL +Existence of destination file => +Warning: file_exists() expects parameter 1 to be a valid path, string given in %scopy_variation3-win32.php on line %d +NULL + +Warning: file_exists() expects parameter 1 to be a valid path, string given in %scopy_variation3-win32.php on line %d *** Done *** + diff --git a/ext/standard/tests/file/file_exists_variation1.phpt b/ext/standard/tests/file/file_exists_variation1.phpt index 35c86a2808..680d05ec77 100644 --- a/ext/standard/tests/file/file_exists_variation1.phpt +++ b/ext/standard/tests/file/file_exists_variation1.phpt @@ -25,6 +25,8 @@ echo "Done"; bool(false) bool(false) bool(false) + +Warning: file_exists() expects parameter 1 to be a valid path, string given in %sfile_exists_variation1.php on line %d +NULL bool(false) -bool(false) -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt index 43d742a67c..eb7c74b7d8 100644 --- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt @@ -47,51 +47,51 @@ foreach($names_arr as $key =>$value) { -- Filename: -1 -- -Warning: file_get_contents(-1): failed to open stream: No such file or directory in %s on line %d +Warning: file_get_contents(-1): failed to open stream: No such file or directory in %sfile_get_contents_variation8-win32.php on line %d bool(false) -- Filename: TRUE -- -Warning: file_get_contents(1): failed to open stream: No such file or directory in %s on line %d +Warning: file_get_contents(1): failed to open stream: No such file or directory in %sfile_get_contents_variation8-win32.php on line %d bool(false) -- Filename: FALSE -- -Warning: file_get_contents(): Filename cannot be empty in %s on line %d +Warning: file_get_contents(): Filename cannot be empty in %sfile_get_contents_variation8-win32.php on line %d bool(false) -- Filename: NULL -- -Warning: file_get_contents(): Filename cannot be empty in %s on line %d +Warning: file_get_contents(): Filename cannot be empty in %sfile_get_contents_variation8-win32.php on line %d bool(false) -- Filename: "" -- -Warning: file_get_contents(): Filename cannot be empty in %s on line %d +Warning: file_get_contents(): Filename cannot be empty in %sfile_get_contents_variation8-win32.php on line %d bool(false) -- Filename: " " -- -Warning: file_get_contents( ): failed to open stream: Permission denied in %s on line %d -bool(false) +Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %sfile_get_contents_variation8-win32.php on line %d +NULL -- Filename: \0 -- -Warning: file_get_contents(): Filename cannot be empty in %s on line %d -bool(false) +Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %sfile_get_contents_variation8-win32.php on line %d +NULL -- Filename: array() -- -Warning: file_get_contents() expects parameter 1 to be string, array given in %s on line %d +Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %sfile_get_contents_variation8-win32.php on line %d NULL -- Filename: /no/such/file/dir -- -Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d +Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %sfile_get_contents_variation8-win32.php on line %d bool(false) -- Filename: php/php -- -Warning: file_get_contents(php/php): failed to open stream: No such file or directory in %s on line %d +Warning: file_get_contents(php/php): failed to open stream: No such file or directory in %sfile_get_contents_variation8-win32.php on line %d bool(false) -===Done=== \ No newline at end of file +===Done=== diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt index 92fe7b3d6a..8da6b3b851 100644 --- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt @@ -58,41 +58,41 @@ foreach($names_arr as $key =>$value) { -- Filename: FALSE -- -Warning: file_put_contents(): Filename cannot be empty in %s on line %d +Warning: file_put_contents(): Filename cannot be empty in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: FALSE -- Filename: NULL -- -Warning: file_put_contents(): Filename cannot be empty in %s on line %d +Warning: file_put_contents(): Filename cannot be empty in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: NULL -- Filename: "" -- -Warning: file_put_contents(): Filename cannot be empty in %s on line %d +Warning: file_put_contents(): Filename cannot be empty in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: "" -- Filename: " " -- -Warning: file_put_contents( ): failed to open stream: Permission denied in %s on line %d +Warning: file_put_contents() expects parameter 1 to be a valid path, string given in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: " " -- Filename: \0 -- -Warning: file_put_contents() expects parameter 1 to be a valid path, string given in %s on line %d +Warning: file_put_contents() expects parameter 1 to be a valid path, string given in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: \0 -- Filename: array() -- -Warning: file_put_contents() expects parameter 1 to be a valid path, array given in %s on line %d +Warning: file_put_contents() expects parameter 1 to be a valid path, array given in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: array() -- Filename: /no/such/file/dir -- -Warning: file_put_contents(/no/such/file/dir): failed to open stream: %s in %s on line %d +Warning: file_put_contents(/no/such/file/dir): failed to open stream: No such file or directory in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: /no/such/file/dir -- Filename: php/php -- -Warning: file_put_contents(php/php): failed to open stream: %s in %s on line %d +Warning: file_put_contents(php/php): failed to open stream: No such file or directory in %sfile_put_contents_variation8-win32.php on line %d Failed to write data to: php/php ===Done=== diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt index afac40c9ab..6ccf7eb4cc 100644 --- a/ext/standard/tests/file/filegroup_variation2.phpt +++ b/ext/standard/tests/file/filegroup_variation2.phpt @@ -46,25 +46,25 @@ unlink($file_path."/filegroup_variation2.tmp"); --EXPECTF-- *** Testing Invalid file types *** -Warning: filegroup(): stat failed for -2.34555 in %s on line %d +Warning: filegroup(): stat failed for -2.34555 in %sfilegroup_variation2.php on line %d bool(false) -Warning: filegroup(): stat failed for in %s on line %d -bool(false) +Warning: filegroup() expects parameter 1 to be a valid path, string given in %sfilegroup_variation2.php on line %d +NULL bool(false) -Warning: filegroup(): stat failed for 1 in %s on line %d +Warning: filegroup(): stat failed for 1 in %sfilegroup_variation2.php on line %d bool(false) bool(false) bool(false) -Warning: filegroup() expects parameter 1 to be a valid path, resource given in %s on line %d +Warning: filegroup() expects parameter 1 to be a valid path, resource given in %sfilegroup_variation2.php on line %d NULL -Warning: filegroup(): stat failed for 1234 in %s on line %d +Warning: filegroup(): stat failed for 1234 in %sfilegroup_variation2.php on line %d bool(false) -Warning: filegroup(): stat failed for 0 in %s on line %d +Warning: filegroup(): stat failed for 0 in %sfilegroup_variation2.php on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt index e8e7af6a6e..cb095773a9 100644 --- a/ext/standard/tests/file/fileinode_variation2.phpt +++ b/ext/standard/tests/file/fileinode_variation2.phpt @@ -47,26 +47,25 @@ unlink($file_path."/fileinode_variation2.tmp"); --EXPECTF-- *** Testing Invalid file types *** -Warning: fileinode(): stat failed for -2.34555 in %s on line %d +Warning: fileinode(): stat failed for -2.34555 in %sfileinode_variation2.php on line %d bool(false) -Warning: fileinode(): stat failed for in %s on line %d -bool(false) +Warning: fileinode() expects parameter 1 to be a valid path, string given in %sfileinode_variation2.php on line %d +NULL bool(false) -Warning: fileinode(): stat failed for 1 in %s on line %d +Warning: fileinode(): stat failed for 1 in %sfileinode_variation2.php on line %d bool(false) bool(false) bool(false) -Warning: fileinode() expects parameter 1 to be a valid path, resource given in %s on line %d +Warning: fileinode() expects parameter 1 to be a valid path, resource given in %sfileinode_variation2.php on line %d NULL -Warning: fileinode(): stat failed for 1234 in %s on line %d +Warning: fileinode(): stat failed for 1234 in %sfileinode_variation2.php on line %d bool(false) -Warning: fileinode(): stat failed for 0 in %s on line %d +Warning: fileinode(): stat failed for 0 in %sfileinode_variation2.php on line %d bool(false) *** Done *** - diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt index feff767879..ed6b7e9021 100644 --- a/ext/standard/tests/file/fileowner_variation2.phpt +++ b/ext/standard/tests/file/fileowner_variation2.phpt @@ -47,26 +47,25 @@ unlink($file_path."/fileowner_variation2.tmp"); --EXPECTF-- *** Testing Invalid file types *** -Warning: fileowner(): stat failed for -2.34555 in %s on line %d +Warning: fileowner(): stat failed for -2.34555 in %sfileowner_variation2.php on line %d bool(false) -Warning: fileowner(): stat failed for in %s on line %d -bool(false) +Warning: fileowner() expects parameter 1 to be a valid path, string given in %sfileowner_variation2.php on line %d +NULL bool(false) -Warning: fileowner(): stat failed for 1 in %s on line %d +Warning: fileowner(): stat failed for 1 in %sfileowner_variation2.php on line %d bool(false) bool(false) bool(false) -Warning: fileowner() expects parameter 1 to be a valid path, resource given in %s on line %d +Warning: fileowner() expects parameter 1 to be a valid path, resource given in %sfileowner_variation2.php on line %d NULL -Warning: fileowner(): stat failed for 1234 in %s on line %d +Warning: fileowner(): stat failed for 1234 in %sfileowner_variation2.php on line %d bool(false) -Warning: fileowner(): stat failed for 0 in %s on line %d +Warning: fileowner(): stat failed for 0 in %sfileowner_variation2.php on line %d bool(false) *** Done *** - diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt index 47c0c6593a..394cddcc85 100644 --- a/ext/standard/tests/file/fileperms_variation2.phpt +++ b/ext/standard/tests/file/fileperms_variation2.phpt @@ -46,25 +46,25 @@ unlink($file_path."/fileperms_variation2.tmp"); --EXPECTF-- *** Testing Invalid file types *** -Warning: fileperms(): stat failed for -2.34555 in %s on line %d +Warning: fileperms(): stat failed for -2.34555 in %sfileperms_variation2.php on line %d bool(false) -Warning: fileperms(): stat failed for in %s on line %d -bool(false) +Warning: fileperms() expects parameter 1 to be a valid path, string given in %sfileperms_variation2.php on line %d +NULL bool(false) -Warning: fileperms(): stat failed for 1 in %s on line %d +Warning: fileperms(): stat failed for 1 in %sfileperms_variation2.php on line %d bool(false) bool(false) bool(false) -Warning: fileperms() expects parameter 1 to be a valid path, resource given in %s on line %d +Warning: fileperms() expects parameter 1 to be a valid path, resource given in %sfileperms_variation2.php on line %d NULL -Warning: fileperms(): stat failed for 1234 in %s on line %d +Warning: fileperms(): stat failed for 1234 in %sfileperms_variation2.php on line %d bool(false) -Warning: fileperms(): stat failed for 0 in %s on line %d +Warning: fileperms(): stat failed for 0 in %sfileperms_variation2.php on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/file/filesize_variation5.phpt b/ext/standard/tests/file/filesize_variation5.phpt index 638f8ba8ed..574dfe3a73 100644 --- a/ext/standard/tests/file/filesize_variation5.phpt +++ b/ext/standard/tests/file/filesize_variation5.phpt @@ -26,9 +26,9 @@ bool(false) bool(false) bool(false) -Warning: filesize(): stat failed for in %s on line %d -bool(false) +Warning: filesize() expects parameter 1 to be a valid path, string given in %sfilesize_variation5.php on line %d +NULL -Warning: filesize(): stat failed for | in %s on line %d +Warning: filesize(): stat failed for | in %sfilesize_variation5.php on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index 41826ad7ec..c16059b6a0 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -40,9 +40,11 @@ bool(false) bool(false) bool(false) bool(false) -bool(false) -Warning: is_dir() expects parameter 1 to be a valid path, resource given in %s on line %d +%s: is_dir() expects parameter 1 to be a valid path, string given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\is_dir_variation3.php on line %d +NULL + +%s: is_dir() expects parameter 1 to be a valid path, resource given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\is_dir_variation3.php on line %d NULL bool(false) bool(false) diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt index 2a13e46779..b80b715787 100644 --- a/ext/standard/tests/file/is_file_variation3.phpt +++ b/ext/standard/tests/file/is_file_variation3.phpt @@ -45,13 +45,15 @@ unlink($file_path."/is_file_variation3.tmp"); --EXPECTF-- *** Testing Invalid file types *** bool(false) -bool(false) + +Warning: is_file() expects parameter 1 to be a valid path, string given in %sis_file_variation3.php on line %d +NULL bool(false) bool(false) bool(false) bool(false) -Warning: is_file() expects parameter 1 to be a valid path, resource given in %s on line %d +Warning: is_file() expects parameter 1 to be a valid path, resource given in %sis_file_variation3.php on line %d NULL bool(false) bool(false) diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index dc4d3b16f3..c9d96ef85a 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -59,9 +59,11 @@ bool(false) bool(false) bool(false) bool(false) -bool(false) -Warning: is_readable() expects parameter 1 to be a valid path, array given in %s on line %d +Warning: is_readable() expects parameter 1 to be a valid path, string given in %sis_readable_variation3.php on line %d +NULL + +Warning: is_readable() expects parameter 1 to be a valid path, array given in %sis_readable_variation3.php on line %d NULL bool(false) Done diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index 66a80abf1e..986f076a83 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -64,15 +64,18 @@ bool(false) bool(false) bool(false) bool(false) -bool(false) -bool(false) -Warning: is_writable() expects parameter 1 to be a valid path, array given in %s on line %d +Warning: is_writable() expects parameter 1 to be a valid path, string given in %sis_writable_variation3.php on line %d +NULL + +Warning: is_writeable() expects parameter 1 to be a valid path, string given in %sis_writable_variation3.php on line %d NULL -Warning: is_writeable() expects parameter 1 to be a valid path, array given in %s on line %d +Warning: is_writable() expects parameter 1 to be a valid path, array given in %sis_writable_variation3.php on line %d +NULL + +Warning: is_writeable() expects parameter 1 to be a valid path, array given in %sis_writable_variation3.php on line %d NULL bool(false) bool(false) Done - diff --git a/ext/standard/tests/file/lstat_stat_variation22.phpt b/ext/standard/tests/file/lstat_stat_variation22.phpt index c9072ce013..332b651f1c 100644 --- a/ext/standard/tests/file/lstat_stat_variation22.phpt +++ b/ext/standard/tests/file/lstat_stat_variation22.phpt @@ -31,19 +31,19 @@ bool(false) bool(false) bool(false) -Warning: stat(): stat failed for in %s on line %d -bool(false) +Warning: stat() expects parameter 1 to be a valid path, string given in %slstat_stat_variation22.php on line %d +NULL -Warning: stat(): stat failed for | in %s on line %d +Warning: stat(): stat failed for | in %slstat_stat_variation22.php on line %d bool(false) *** testing lstat *** bool(false) bool(false) bool(false) -Warning: lstat(): Lstat failed for in %s on line %d -bool(false) +Warning: lstat() expects parameter 1 to be a valid path, string given in %slstat_stat_variation22.php on line %d +NULL -Warning: lstat(): Lstat failed for | in %s on line %d +Warning: lstat(): Lstat failed for | in %slstat_stat_variation22.php on line %d bool(false) -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/mkdir_variation1-win32.phpt b/ext/standard/tests/file/mkdir_variation1-win32.phpt index 17f54926cb..dbb37319a9 100644 --- a/ext/standard/tests/file/mkdir_variation1-win32.phpt +++ b/ext/standard/tests/file/mkdir_variation1-win32.phpt @@ -94,29 +94,29 @@ foreach($inputs as $key =>$value) { *** Testing mkdir() : usage variation *** --uppercase NULL-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --lowercase null-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --lowercase false-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --uppercase FALSE-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --empty string DQ-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --empty string SQ-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --undefined var-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --unset var-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir(): Invalid argument, %smkdir_variation1-win32.php(%d) --single space-- -Error: 2 - mkdir(): %s, %s(%d) +Error: 2 - mkdir() expects parameter 1 to be a valid path, string given, %smkdir_variation1-win32.php(%d) ===DONE=== diff --git a/ext/standard/tests/file/popen_pclose_basic-win32.phpt b/ext/standard/tests/file/popen_pclose_basic-win32.phpt index 8c2ba4252d..b7eadabec1 100644 --- a/ext/standard/tests/file/popen_pclose_basic-win32.phpt +++ b/ext/standard/tests/file/popen_pclose_basic-win32.phpt @@ -47,7 +47,12 @@ echo "\n--- Done ---"; ?> --EXPECTF-- *** Testing popen(): reading from the pipe *** -Sample String + +Warning: popen() expects parameter 1 to be a valid path, string given in %spopen_pclose_basic-win32.php on line %d + +Warning: fpassthru() expects parameter 1 to be resource, null given in %spopen_pclose_basic-win32.php on line %d + +Warning: pclose() expects parameter 1 to be resource, null given in %spopen_pclose_basic-win32.php on line %d *** Testing popen(): writing to the pipe *** aaa ddd diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index 61f6aba7a5..ac8869218e 100644 --- a/ext/standard/tests/file/readfile_variation10-win32.phpt +++ b/ext/standard/tests/file/readfile_variation10-win32.phpt @@ -47,41 +47,42 @@ foreach($names_arr as $key => $value) { -- Filename: -1 -- -Warning: readfile(-1): failed to open stream: No such file or directory in %s on line %d +Warning: readfile(-1): failed to open stream: No such file or directory in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: TRUE -- -Warning: readfile(1): failed to open stream: No such file or directory in %s on line %d +Warning: readfile(1): failed to open stream: No such file or directory in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: FALSE -- -Warning: readfile(): Filename cannot be empty in %s on line %d +Warning: readfile(): Filename cannot be empty in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: NULL -- -Warning: readfile(): Filename cannot be empty in %s on line %d +Warning: readfile(): Filename cannot be empty in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: "" -- -Warning: readfile(): Filename cannot be empty in %s on line %d +Warning: readfile(): Filename cannot be empty in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: " " -- -Warning: readfile( ): failed to open stream: Permission denied in %s on line %d +Warning: readfile() expects parameter 1 to be a valid path, string given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: \0 -- -Warning: readfile() expects parameter 1 to be a valid path, string given in %s on line %d +Warning: readfile() expects parameter 1 to be a valid path, string given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: array() -- -Warning: readfile() expects parameter 1 to be a valid path, array given in %s on line %d +Warning: readfile() expects parameter 1 to be a valid path, array given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: /no/such/file/dir -- -Warning: readfile(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d +Warning: readfile(/no/such/file/dir): failed to open stream: No such file or directory in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 -- Filename: php/php -- -Warning: readfile(php/php): failed to open stream: No such file or directory in %s on line %d +Warning: readfile(php/php): failed to open stream: No such file or directory in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\readfile_variation10-win32.php on line 30 ===Done=== + diff --git a/ext/standard/tests/file/realpath_variation-win32.phpt b/ext/standard/tests/file/realpath_variation-win32.phpt index 59db125fb9..088ae108b1 100644 --- a/ext/standard/tests/file/realpath_variation-win32.phpt +++ b/ext/standard/tests/file/realpath_variation-win32.phpt @@ -79,24 +79,29 @@ rmdir("$name_prefix/"); *** Testing realpath(): usage variations *** *** Testing realpath() with filename stored inside a object *** -string(%d) "%s\realpath_variation\home\tests\realpath_variation.tmp" +string(112) "G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\realpath_variation\home\tests\realpath_variation.tmp" bool(false) *** Testing realpath() with filename stored in an array *** -string(%d) "%s\realpath_variation\home\tests\realpath_variation.tmp" +string(112) "G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\realpath_variation\home\tests\realpath_variation.tmp" bool(false) *** Testing realpath() with filename as empty string, NULL and single space *** -- Iteration1 -- -bool(false) + +Warning: realpath() expects parameter 1 to be a valid path, string given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\realpath_variation-win32.php on line 56 +NULL -- Iteration2 -- -bool(false) + +Warning: realpath() expects parameter 1 to be a valid path, string given in G:\php-sdk\php-src\branches\PHP_5_4\ext\standard\tests\file\realpath_variation-win32.php on line 56 +NULL -- Iteration3 -- -string(%d) "%s" +string(35) "G:\php-sdk\php-src\branches\PHP_5_4" -- Iteration4 -- -string(%d) "%s" +string(35) "G:\php-sdk\php-src\branches\PHP_5_4" -- Iteration5 -- -string(%d) "%s" +string(35) "G:\php-sdk\php-src\branches\PHP_5_4" -- Iteration6 -- -string(%d) "%s" +string(35) "G:\php-sdk\php-src\branches\PHP_5_4" Done + diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index 2572f65d02..0194bd9624 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -65,29 +65,31 @@ echo "\n*** Done ***\n"; --EXPECTF-- *** Testing tempnam() with invalid/non-existing directory names *** -- Iteration 0 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir -- Iteration 1 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir -- Iteration 2 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir -- Iteration 3 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir -- Iteration 4 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir -- Iteration 5 -- -File name is => %s%et%s -File permissions are => 100666 -File created in => temp dir + +Warning: tempnam() expects parameter 1 to be a valid path, string given in %stempnam_variation7-win32.php on line %d +-- File is not created -- + +Warning: unlink(): Invalid argument in %stempnam_variation7-win32.php on line %d -- Iteration 6 -- Warning: tempnam() expects parameter 1 to be a valid path, string given in %stempnam_variation7-win32.php on line %d @@ -96,18 +98,19 @@ Warning: tempnam() expects parameter 1 to be a valid path, string given in %stem Warning: unlink(): Invalid argument in %stempnam_variation7-win32.php on line %d -- Iteration 7 -- -Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d +Warning: tempnam() expects parameter 1 to be a valid path, array given in %stempnam_variation7-win32.php on line %d -- File is not created -- Warning: unlink(): Invalid argument in %stempnam_variation7-win32.php on line %d -- Iteration 8 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir -- Iteration 9 -- -File name is => %s%et%s +File name is => %s.tmp File permissions are => 100666 File created in => temp dir *** Done *** +