Skip to content

Commit 521c36c

Browse files
committed
Remove IGNORE_URL_WIN macro
This macro is defined to zero as of PHP 5.0.0, and as the comment indicates, is no longer relevant. Thus, we remove the definition and all usages from the core and bundled extensions. Closes GH-6351.
1 parent 7fe9df5 commit 521c36c

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ PHP 8.1 UPGRADE NOTES
6363
12. Windows Support
6464
========================================
6565

66+
. The macro IGNORE_URL_WIN has been removed; it had no effect as of PHP 5.0.0.
67+
6668
========================================
6769
13. Other Changes
6870
========================================

ext/gd/gd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ PHP_FUNCTION(imageloadfont)
625625
RETURN_THROWS();
626626
}
627627

628-
stream = php_stream_open_wrapper(ZSTR_VAL(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
628+
stream = php_stream_open_wrapper(ZSTR_VAL(file), "rb", IGNORE_PATH | REPORT_ERRORS, NULL);
629629
if (stream == NULL) {
630630
RETURN_FALSE;
631631
}
@@ -1584,7 +1584,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15841584
}
15851585

15861586

1587-
stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
1587+
stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|IGNORE_PATH, NULL);
15881588
if (stream == NULL) {
15891589
RETURN_FALSE;
15901590
}
@@ -1883,7 +1883,7 @@ PHP_FUNCTION(imagexbm)
18831883
im = php_gd_libgdimageptr_from_zval_p(imgind);
18841884

18851885
if (file != NULL) {
1886-
stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
1886+
stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH, NULL);
18871887
if (stream == NULL) {
18881888
RETURN_FALSE;
18891889
}
@@ -4092,7 +4092,7 @@ static gdIOCtx *create_stream_context_from_zval(zval *to_zval) {
40924092
return NULL;
40934093
}
40944094

4095-
stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
4095+
stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH, NULL);
40964096
if (stream == NULL) {
40974097
return NULL;
40984098
}

ext/standard/basic_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,7 @@ PHPAPI int _php_error_log_ex(int opt_err, const char *message, size_t message_le
14721472
return FAILURE;
14731473

14741474
case 3: /*save to a file */
1475-
stream = php_stream_open_wrapper(opt, "a", IGNORE_URL_WIN | REPORT_ERRORS, NULL);
1475+
stream = php_stream_open_wrapper(opt, "a", REPORT_ERRORS, NULL);
14761476
if (!stream) {
14771477
return FAILURE;
14781478
}

ext/standard/mail.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void php_mail_log_to_syslog(char *message) {
371371

372372
void php_mail_log_to_file(char *filename, char *message, size_t message_size) {
373373
/* Write 'message' to the given file. */
374-
uint32_t flags = IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR;
374+
uint32_t flags = REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR;
375375
php_stream *stream = php_stream_open_wrapper(filename, "a", flags, NULL);
376376
if (stream) {
377377
php_stream_write(stream, message, message_size);

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ PHP_FUNCTION(set_time_limit)
14501450
/* {{{ php_fopen_wrapper_for_zend */
14511451
static FILE *php_fopen_wrapper_for_zend(const char *filename, zend_string **opened_path)
14521452
{
1453-
return php_stream_open_wrapper_as_file((char *)filename, "rb", USE_PATH|IGNORE_URL_WIN|REPORT_ERRORS|STREAM_OPEN_FOR_INCLUDE, opened_path);
1453+
return php_stream_open_wrapper_as_file((char *)filename, "rb", USE_PATH|REPORT_ERRORS|STREAM_OPEN_FOR_INCLUDE, opened_path);
14541454
}
14551455
/* }}} */
14561456

main/php_streams.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,6 @@ END_EXTERN_C()
550550
/* Allow blocking reads on anonymous pipes on Windows. */
551551
#define STREAM_USE_BLOCKING_PIPE 0x00008000
552552

553-
/* Antique - no longer has meaning */
554-
#define IGNORE_URL_WIN 0
555-
556553
int php_init_stream_wrappers(int module_number);
557554
int php_shutdown_stream_wrappers(int module_number);
558555
void php_shutdown_stream_hashes(void);

0 commit comments

Comments
 (0)