mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
- reject paths with trainling spaces using the very good new zend arg
This commit is contained in:
parent
4efd9c43a9
commit
6b4717da8e
21 changed files with 169 additions and 136 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
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
|
||||
bool(false)
|
||||
|
||||
Warning: touch(): %s in %s on line %d
|
||||
bool(false)
|
||||
|
||||
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
|
||||
|
|
|
@ -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 ***
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ echo "Done";
|
|||
bool(false)
|
||||
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)
|
||||
Done
|
|
@ -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===
|
|
@ -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===
|
||||
|
|
|
@ -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 ***
|
||||
|
|
|
@ -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 ***
|
||||
|
||||
|
|
|
@ -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 ***
|
||||
|
||||
|
|
|
@ -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 ***
|
||||
|
|
|
@ -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 ***
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, array given in %s on line %d
|
||||
Warning: is_writeable() expects parameter 1 to be a valid path, string given in %sis_writable_variation3.php on line %d
|
||||
NULL
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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===
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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===
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ***
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue