Skip to content

Commit d9458aa

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Bugfix #74598 ftp:// ignores context
2 parents 398efb0 + 05849a2 commit d9458aa

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ PHP NEWS
1414
. Fixed bug #74478 (null coalescing operator failing with SplFixedArray).
1515
(jhdxr)
1616

17+
- FTP:
18+
. Fixed bug #74598 (ftp:// wrapper ignores context arg). (Sara)
19+
1720
8 Jun 2017, PHP 7.1.6
1821

1922
- Core:

ext/standard/ftp_fopen_wrapper.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static int php_stream_ftp_unlink(php_stream_wrapper *wrapper, const char *url, i
908908
int result;
909909
char tmp_line[512];
910910

911-
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, NULL, NULL, &resource, NULL, NULL);
911+
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL);
912912
if (!stream) {
913913
if (options & REPORT_ERRORS) {
914914
php_error_docref(NULL, E_WARNING, "Unable to connect to %s", url);
@@ -979,7 +979,7 @@ static int php_stream_ftp_rename(php_stream_wrapper *wrapper, const char *url_fr
979979
goto rename_errexit;
980980
}
981981

982-
stream = php_ftp_fopen_connect(wrapper, url_from, "r", 0, NULL, NULL, NULL, NULL, NULL, NULL);
982+
stream = php_ftp_fopen_connect(wrapper, url_from, "r", 0, NULL, context, NULL, NULL, NULL, NULL);
983983
if (!stream) {
984984
if (options & REPORT_ERRORS) {
985985
php_error_docref(NULL, E_WARNING, "Unable to connect to %s", resource_from->host);
@@ -1037,7 +1037,7 @@ static int php_stream_ftp_mkdir(php_stream_wrapper *wrapper, const char *url, in
10371037
int result, recursive = options & PHP_STREAM_MKDIR_RECURSIVE;
10381038
char tmp_line[512];
10391039

1040-
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, NULL, NULL, &resource, NULL, NULL);
1040+
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL);
10411041
if (!stream) {
10421042
if (options & REPORT_ERRORS) {
10431043
php_error_docref(NULL, E_WARNING, "Unable to connect to %s", url);
@@ -1131,7 +1131,7 @@ static int php_stream_ftp_rmdir(php_stream_wrapper *wrapper, const char *url, in
11311131
int result;
11321132
char tmp_line[512];
11331133

1134-
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, NULL, NULL, &resource, NULL, NULL);
1134+
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL);
11351135
if (!stream) {
11361136
if (options & REPORT_ERRORS) {
11371137
php_error_docref(NULL, E_WARNING, "Unable to connect to %s", url);

0 commit comments

Comments
 (0)