mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-02 21:56:47 +00:00
Fix "PHP Notice: Use of undefined constant STDOUT" when reading the PHP script from stdin
This commit is contained in:
@@ -133,6 +133,12 @@ class Curl
|
||||
$this->get($url);
|
||||
fclose($fh);
|
||||
|
||||
// Fix "PHP Notice: Use of undefined constant STDOUT" when reading the
|
||||
// PHP script from stdin.
|
||||
if (!defined('STDOUT')) {
|
||||
define('STDOUT', null);
|
||||
}
|
||||
|
||||
// Reset CURLOPT_FILE with STDOUT to avoid: "curl_exec(): CURLOPT_FILE
|
||||
// resource has gone away, resetting to default". Using null causes
|
||||
// "curl_setopt(): supplied argument is not a valid File-Handle
|
||||
|
||||
Reference in New Issue
Block a user