Fix "PHP Notice: Use of undefined constant STDOUT" when reading the PHP script from stdin

This commit is contained in:
Zach Borboa
2015-02-12 23:20:52 +07:00
parent 9d55cee39b
commit f847128cf3
+6
View File
@@ -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