Bug #78007 [NEW]: curl_close() does not honor CURLOPT_STDERR

From: Date: Mon, 13 May 2019 10:41:06 +0000
Subject: Bug #78007 [NEW]: curl_close() does not honor CURLOPT_STDERR
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220832@lists.php.net to get a copy of this message
From:             divinity76 at gmail dot com
Operating system: Windows 7 x64 SP1
PHP version:      7.3.5
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:curl_close() does not honor CURLOPT_STDERR

Description:
------------
curl_close() does not honor CURLOPT_STDERR if the curl handle has been
doing HTTP requests, then it prints 3 lines to the actual stderr,
regardless of what CURLOPT_STDERR is set to.

i know PHP 7.0.12 is not affected, so it happened somewhere between
7.0.13 and 7.3.4

Test script:
---------------
php -r
'$ch=curl_init();$tmp=tmpfile();curl_setopt_array($ch,array(CURLOPT_VERBOSE=>1,CURLOPT_URL=>"http://gstatic.com/generate_204",CURLOPT_STDERR=>$tmp));
curl_exec($ch);curl_close($ch);fclose($tmp);'

Expected result:
----------------
(blank)

Actual result:
--------------
$ php -r
'$ch=curl_init();$tmp=tmpfile();curl_setopt_array($ch,array(CURLOPT_VER
* Marked for [closure]: kill all
* Closing connection 0
* The cache now contains 0 members

-- 
Edit bug report at https://bugs.php.net/bug.php?id=78007&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=78007&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=78007&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=78007&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=78007&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=78007&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=78007&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=78007&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=78007&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=78007&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=78007&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=78007&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=78007&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=78007&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78007&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=78007&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=78007&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=78007&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78007&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=78007&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=78007&r=mysqlcfg



Thread (14 messages)

« previous php.bugs (#220832) next »