Skip to content

Commit 10f8809

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix context option check for "overwrite" in FTP
2 parents 21c1fb6 + 1288c07 commit 10f8809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/ftp_fopen_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pa
488488
} else if (read_write == 2) {
489489
/* when writing file (but not appending), it must NOT exist, unless a context option exists which allows it */
490490
if (context && (tmpzval = php_stream_context_get_option(context, "ftp", "overwrite")) != NULL) {
491-
allow_overwrite = Z_LVAL_P(tmpzval) ? 1 : 0;
491+
allow_overwrite = zend_is_true(tmpzval);
492492
}
493493
if (result <= 299 && result >= 200) {
494494
if (allow_overwrite) {

0 commit comments

Comments
 (0)