Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ PHP 8.7 UPGRADE NOTES
converted to an int.
. Nested arrays in CURLOPT_POSTFIELDS now throw a TypeError, instead of being
silently converted to the string "Array".
. Negative values for CURLOPT_POSTREDIR are now rejected, making
curl_setopt() return false, instead of being silently interpreted as a
combination of redirect types.

- PDO:
. PDOStatement::bindColumn() now throws a ValueError when the column name is
Expand Down
6 changes: 1 addition & 5 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
case CURLOPT_TCP_KEEPCNT:
#endif
case CURLOPT_FOLLOWLOCATION:
case CURLOPT_POSTREDIR:
lval = zval_get_long(zvalue);
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
(PG(open_basedir) && *PG(open_basedir)) && (lval & CURLPROTO_FILE)) {
Expand Down Expand Up @@ -2259,11 +2260,6 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
error = curl_easy_setopt(ch->cp, option, (curl_off_t)lval);
break;

case CURLOPT_POSTREDIR:
lval = zval_get_long(zvalue);
error = curl_easy_setopt(ch->cp, CURLOPT_POSTREDIR, (long) (lval & CURL_REDIR_POST_ALL));
break;

/* the following options deal with files, therefore the open_basedir check
* is required.
*/
Expand Down
Loading