htmlspecialchars shown as typo?

I'm using the built-in spell checker, but since some version,  "htmlspecialchars" is shown as a typo. Since this is a built-in PHP function, that message should not occur.

Can anyone confirm this being an actual bug?

8 comments
Comment actions Permalink

Hi there,

PhpStorm 2020.1.3, Windows 10 -- works fine for me.

1) Try in a brand new project

2) If you Ctrl+Click on such function call -- where it will take you to? Maybe you have PHP stubs disabled somehow?..

3) Make sure that all bundled dictionaries are enabled.

Those are the main things that come into my mind. Other than that:

4) Try "File | Invalidate Caches.." and restart IDE (sometimes may help). Even PC restart (often helps with debugger; who knows, may help here as well...)

5) Try with all custom (not bundled by default) plugins disabled (in case if one of them somehow interfere with the rest...)

0
Comment actions Permalink

The settings seem alright, but I just noticed some really odd thing. Check the screenshot:

I tried some various occurrences of "htmlspecialchars", but only the last one fails.

0
Comment actions Permalink

Place caret before that last entry and press Alt+Enter -- what menu do you see? Does Ctrl+Click navigation still works fine there?

Please share that code sample as a text (so it can be copy-pasted). That line on its own in a .php file looks just fine for me.

0
Comment actions Permalink

OK, I just tried the same on a different PC with a totally clean project and have the same problem. 

Here is the sourcecode of the example:  https://pastebin.com/ECv5iGHJ

The CTRL+Click navigation works, the parameters are shown correctly (as you can see in the screenshots)

New example on the other PC:

It looks like its always failing when called in a HTML Attribute.

 

Alt+Enter:

 

Tooltip when hovering with mouse:

 

Hovering a different function call:

(Please ignore the 2019.3.1 folder. Its a fully updated version 2020.1.3)

 

Method stub when CTRL+clicking

 

 

0
Comment actions Permalink

Works just fine here:

I'm out of ideas on what that might be if you do see the same in a brand new (empty) project with just one file on a fresh PC...

Please check idea.log (Help | Show Log in....) -- maybe it will have some hints (exceptions or alike).

 

>(Please ignore the 2019.3.1 folder. Its a fully updated version 2020.1.3)

How did you install it? Via built-in updates (patches)? Please uninstall (but keep all the settings) and install full fresh copy using standalone installer. It's possible that your installation is somehow corrupted... But then .. if it works the same on another clean PC it should make no difference...

0
Comment actions Permalink

Well, I think 2019.3.1 was a major update, hence a full install with migration of settings. I always used the built-in updater.

Is it possible that you guys have the spell checker disabled?

I just downloaded a fresh version and installed it. But since my version was actually the most recent, the settings were just taken over. So I reset all my settings via the "Restore default settings" function. All is gone now, Theme, fonts, keys, everything. 

I created a brand new project and pasted the code from yesterday and I still see the errors:

I'm really out of ideas now.

0
Comment actions Permalink

It is enabled.

But I just did what I have been recommending to you (disabling and re-enabling all custom plugins, restarting PC) and now I see the same: it works just fine in plain PHP context and fails when the same code is used inside the values of the HTML attributes...

Sadly I could not find any existing tickets that would describe the same behaviour when doing my search. Generic ticket is https://youtrack.jetbrains.com/issue/IDEA-243256 (which works in plain PHP context already anyway). And it's not https://youtrack.jetbrains.com/issue/IDEA-244415

Just report this to PhpStorm issue tracker and let devs figure out the right ticket or why it behaves like that: Issue Tracker

0
Comment actions Permalink

Thanks for confirming. I'll submit a ticket.

0

Please sign in to leave a comment.