Vscode-intelephense: VS Code undefined function

Created on 23 Dec 2019  路  7Comments  路  Source: bmewburn/vscode-intelephense

Some php native functions displaying errors(red lines);
Error:
Undefined function 'sqlsrv_query' .intelephense(1010)
Undefined function 'sqlsrv_fetch_array'.intelephense(1010)
All files in my project with those php functions are displaying errors.

https://user-images.githubusercontent.com/24595935/71382564-8c7ca800-25a6-11ea-8499-5bf8547d52e9.png

OS - Windows 10 pro
Intelephense version 1.3.6

Most helpful comment

You can add sqlsrv to the intelephense.stubs setting to make these symbols available.

All 7 comments

You can add sqlsrv to the intelephense.stubs setting to make these symbols available.

Works. But now I got error with parameters
Expected 3 arguments. Found 2.intelephense(1005) [parameter 3 is optional in the php function]
https://user-images.githubusercontent.com/24595935/71417381-065a7300-2633-11ea-91c8-e80b20a1f194.png

Also with " ; " at the end of the line. (Javascript)
https://user-images.githubusercontent.com/24595935/71417356-e88d0e00-2632-11ea-9e75-4edc9ab46568.png

Sorry about that, but I payed the premium, and my project still red in to many files.

@AlexR04
First issue upstream: https://github.com/JetBrains/phpstorm-stubs/pull/727
Second tracked in #836

merged

Is there any way to disable this check for a line? (Decorators?)

I am using memprof (memprof_enable,memprof_dump_callgrind) functions which apparently are not available.

@xenogenesi You can add file from this comment to your workspace https://github.com/arnaud-lb/php-memory-profiler/issues/30#issuecomment-497820479

@KapitanOczywisty Thanks it works! How did I not think about it ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steven7mwesigwa picture steven7mwesigwa  路  4Comments

vanasis picture vanasis  路  4Comments

Ilyes512 picture Ilyes512  路  3Comments

pseudoanime picture pseudoanime  路  3Comments

usrnm-nk picture usrnm-nk  路  3Comments