Skip to content

Commit 126cecd

Browse files
committed
Standardize stream error output
1 parent 68c519f commit 126cecd

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

ext/standard/tests/file/mkdir_rmdir_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ bool(false)
5353

5454
*** Testing rmdir() on non-existent directory ***
5555

56-
Warning: rmdir(): No such file or directory with URI (temp) in %s on line %d
56+
Warning: rmdir(): No such file or directory (temp) in %s on line %d
5757
bool(false)
5858
Done

ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ bool(true)
15991599
*** Testing rmdir() on a non-empty directory ***
16001600
bool(true)
16011601

1602-
Warning: rmdir(): Directory not empty with URI (%s/mkdir私はガラスを食べられます/) in %s on line %d
1602+
Warning: rmdir(): Directory not empty (%s/mkdir私はガラスを食べられます/) in %s on line %d
16031603
bool(false)
16041604

16051605
*** Testing mkdir() and rmdir() for binary safe functionality ***

ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ bool(true)
15991599
*** Testing rmdir() on a non-empty directory ***
16001600
bool(true)
16011601

1602-
Warning: rmdir(): Directory not empty with URI (%s/mkdir/) in %s on line %d
1602+
Warning: rmdir(): Directory not empty (%s/mkdir/) in %s on line %d
16031603
bool(false)
16041604

16051605
*** Testing mkdir() and rmdir() for binary safe functionality ***

ext/standard/tests/file/mkdir_rmdir_variation2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ bool(true)
6060
*** Testing rmdir() on a non-empty directory ***
6161
bool(true)
6262

63-
Warning: rmdir(): %s with URI (%s/mkdir_variation2/) in %s on line %d
63+
Warning: rmdir(): %s (%s/mkdir_variation2/) in %s on line %d
6464
bool(false)
6565

6666
*** Testing mkdir() and rmdir() for binary safe functionality ***

ext/standard/tests/file/rmdir_variation3-win32.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ Directory removed
8282
Directory removed
8383
-- removing rmdirVar3.tmp\..\BADDIR\aSubDir --
8484

85-
Warning: rmdir(): No such file or directory with URI (rmdirVar3.tmp\..\BADDIR\aSubDir) in %s on line %d
85+
Warning: rmdir(): No such file or directory (rmdirVar3.tmp\..\BADDIR\aSubDir) in %s on line %d
8686
-- removing BADDIR\aSubDir --
8787

88-
Warning: rmdir(): No such file or directory with URI (BADDIR\aSubDir) in %s on line %d
88+
Warning: rmdir(): No such file or directory (BADDIR\aSubDir) in %s on line %d
8989
-- removing %s\rmdirVar3.tmp\aSubDir --
9090
Directory removed
9191
-- removing %s\.\rmdirVar3.tmp\aSubDir --
@@ -94,7 +94,7 @@ Directory removed
9494
Directory removed
9595
-- removing %s\BADDIR\aSubDir --
9696

97-
Warning: rmdir(): No such file or directory with URI (%s\BADDIR\aSubDir) in %s on line %d
97+
Warning: rmdir(): No such file or directory (%s\BADDIR\aSubDir) in %s on line %d
9898
-- removing rmdirVar3.tmp\aSubDir\ --
9999
Directory removed
100100
-- removing %s\rmdirVar3.tmp\aSubDir\ --

ext/standard/tests/file/rmdir_variation3.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ Directory removed
7272
Directory removed
7373
-- removing rmdirVar3.tmp/../BADDIR/aSubDir --
7474

75-
Warning: rmdir(): No such file or directory with URI (rmdirVar3.tmp/../BADDIR/aSubDir) in %s on line %d
75+
Warning: rmdir(): No such file or directory (rmdirVar3.tmp/../BADDIR/aSubDir) in %s on line %d
7676
-- removing BADDIR/aSubDir --
7777

78-
Warning: rmdir(): No such file or directory with URI (BADDIR/aSubDir) in %s on line %d
78+
Warning: rmdir(): No such file or directory (BADDIR/aSubDir) in %s on line %d
7979
-- removing %s/rmdirVar3.tmp/aSubDir --
8080
Directory removed
8181
-- removing %s/./rmdirVar3.tmp/aSubDir --
@@ -84,7 +84,7 @@ Directory removed
8484
Directory removed
8585
-- removing %s/BADDIR/aSubDir --
8686

87-
Warning: rmdir(): No such file or directory with URI (%s/BADDIR/aSubDir) in %s on line %d
87+
Warning: rmdir(): No such file or directory (%s/BADDIR/aSubDir) in %s on line %d
8888
-- removing rmdirVar3.tmp/aSubDir/ --
8989
Directory removed
9090
-- removing %s/rmdirVar3.tmp/aSubDir/ --

main/streams/plain_wrapper.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,13 +1357,13 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i
13571357

13581358
#ifdef PHP_WIN32
13591359
if (!php_win32_check_trailing_space(url, strlen(url))) {
1360-
php_error_docref(NULL, E_WARNING, "%s with URI (%s)", strerror(errno), url);
1360+
php_error_docref(NULL, E_WARNING, "%s (%s)", strerror(errno), url);
13611361
return 0;
13621362
}
13631363
#endif
13641364

13651365
if (VCWD_RMDIR(url) < 0) {
1366-
php_error_docref(NULL, E_WARNING, "%s with URI (%s)", strerror(errno), url);
1366+
php_error_docref(NULL, E_WARNING, "%s (%s)", strerror(errno), url);
13671367
return 0;
13681368
}
13691369

@@ -1385,6 +1385,7 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url
13851385

13861386
#ifdef PHP_WIN32
13871387
if (!php_win32_check_trailing_space(url, strlen(url))) {
1388+
/* Seems no tests is covering this section */
13881389
php_error_docref(NULL, E_WARNING, "%s with URI (%s)", strerror(ENOENT), url);
13891390
return 0;
13901391
}

0 commit comments

Comments
 (0)