File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -171,15 +171,14 @@ public function downloadComplete($fh)
171
171
}
172
172
173
173
// Fix "PHP Notice: Use of undefined constant STDOUT" when reading the
174
- // PHP script from stdin.
174
+ // PHP script from stdin. Using null causes "Warning: curl_setopt():
175
+ // supplied argument is not a valid File-Handle resource".
175
176
if (!defined ('STDOUT ' )) {
176
- define ('STDOUT ' , null );
177
+ define ('STDOUT ' , fopen ( ' php://stdout ' , ' w ' ) );
177
178
}
178
179
179
180
// Reset CURLOPT_FILE with STDOUT to avoid: "curl_exec(): CURLOPT_FILE
180
- // resource has gone away, resetting to default". Using null causes
181
- // "curl_setopt(): supplied argument is not a valid File-Handle
182
- // resource".
181
+ // resource has gone away, resetting to default".
183
182
$ this ->setOpt (CURLOPT_FILE , STDOUT );
184
183
185
184
// Reset CURLOPT_RETURNTRANSFER to tell cURL to return subsequent
You can’t perform that action at this time.
0 commit comments