Functors. (Christian Seiler)
- Fixed bug #48757 (ReflectionFunction::invoke() parameter issues). (Kalle)
+- Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
+ files that have been opened with r+). (Ilia)
- Fixed bug #48681 (openssl signature verification for tar archives broken).
(Greg)
- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
error = CURLE_OK;
switch (option) {
case CURLOPT_FILE:
- if (((php_stream *) what)->mode[0] != 'r') {
+ if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
zend_list_addref(Z_LVAL_PP(zvalue));
ch->handlers->write->fp = fp;
ch->handlers->write->method = PHP_CURL_FILE;
}
break;
case CURLOPT_WRITEHEADER:
- if (((php_stream *) what)->mode[0] != 'r') {
+ if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
zend_list_addref(Z_LVAL_PP(zvalue));
ch->handlers->write_header->fp = fp;
ch->handlers->write_header->method = PHP_CURL_FILE;
ch->handlers->read->fd = Z_LVAL_PP(zvalue);
break;
case CURLOPT_STDERR:
- if (((php_stream *) what)->mode[0] != 'r') {
+ if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
if (ch->handlers->std_err) {
zval_ptr_dtor(&ch->handlers->std_err);
}