-
-
Notifications
You must be signed in to change notification settings - Fork 947
Signature improperly read from PHPStorm stubs #7676
Copy link
Copy link
Closed
Labels
Milestone
Description
Bug report
Some functions (pgsql) converted from resource to object. However, the conditional typing is somehow broken for some functions. For me: pg_escape_literal and pg_escape_identifier, maybe others. I expect this is broken by some wrong type processing/evaluation, because the proper typing is present in PHPStorm stubs.
Code snippet that reproduces the problem
https://phpstan.org/r/11f31e1b-3464-4480-a43b-7a0b590b094a
$connection = pg_connect("", PGSQL_CONNECT_FORCE_NEW);
if ($connection === false) return;
pg_escape_literal($connection, "test");Expected output
No error.
Reactions are currently unavailable