-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Description
Bug report
The curl option CURLOPT_COOKIEFILE is allowed to be empty, but PHPStan complains that non-empty-string must be supplied. The documentation says:
CURLOPT_COOKIEFILE: The name of the file containing the cookie data. The cookie file can be in Netscape format, or just plain HTTP-style headers dumped into a file. If the name is an empty string, no cookies are loaded, but cookie handling is still enabled.
Code snippet that reproduces the problem
function example(): void {
$curl = curl_init();
curl_setopt($curl, CURLOPT_COOKIEFILE, '');
}
https://phpstan.org/r/65119d59-c9ef-43ff-9ecd-93860ce82f51
Expected output
No errors.
Metadata
Metadata
Assignees
Labels
No labels