Vscode-intelephense: user_error optional parameters not recognized

Created on 4 Apr 2019  路  3Comments  路  Source: bmewburn/vscode-intelephense

Hi,

This issue is probably equal to the one in #228.

I'm getting the error message "Expected 2 arguments. Found 1.intelephense(10005)" on user_error, even though it has 1 required and 1 optional argument. It seems to work as expected for trigger_error, which is what user_error is an alias for. But to rename all user_error to trigger_error just to satisfy intelephense seems silly.

upstream

Most helpful comment

All 3 comments

Yes, 2nd parameter is optional but no default value is defined:

https://github.com/JetBrains/phpstorm-stubs/blob/master/Core/Core.php#L609

Feel free to submit a PR to the phpstorm-stubs repo :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pseudoanime picture pseudoanime  路  3Comments

zlianon picture zlianon  路  3Comments

nn-hh picture nn-hh  路  3Comments

superadmini picture superadmini  路  4Comments

steven7mwesigwa picture steven7mwesigwa  路  4Comments