Skip to content

Commit fdc0764

Browse files
committed
Convert explict Windows error to docref error
Explicitly write Windows error and error code when file, directory or volume label is incorrect.
1 parent 150294d commit fdc0764

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main/streams/plain_wrapper.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,11 +1169,13 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_f
11691169

11701170
#ifdef PHP_WIN32
11711171
if (!php_win32_check_trailing_space(url_from, strlen(url_from))) {
1172-
php_win32_docref2_from_error(ERROR_INVALID_NAME, url_from, url_to);
1172+
php_error_docref(NULL, E_WARNING,
1173+
"The filename, directory name, or volume label syntax is incorrect. (%s) (code: 123)", url_from);
11731174
return 0;
11741175
}
11751176
if (!php_win32_check_trailing_space(url_to, strlen(url_to))) {
1176-
php_win32_docref2_from_error(ERROR_INVALID_NAME, url_from, url_to);
1177+
php_error_docref(NULL, E_WARNING,
1178+
"The filename, directory name, or volume label syntax is incorrect. (%s) (code: 123)", url_to);
11771179
return 0;
11781180
}
11791181
#endif

0 commit comments

Comments
 (0)