Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive may not support offset operations for mb_str_split #1941

Open
Simbiat opened this issue Apr 28, 2024 · 0 comments
Open

False positive may not support offset operations for mb_str_split #1941

Simbiat opened this issue Apr 28, 2024 · 0 comments

Comments

@Simbiat
Copy link

Simbiat commented Apr 28, 2024

Subject Details
Plugin Php Inspections (EA Extended)
Language level PHP 8.3

Current behaviour

$test = mb_str_split('test', 1, 'UTF-8');
$test[1] = 0;

Highlights 2nd line
image

I assume this is because it picks up polyfil
image
But it should not, since I am not in that namespace, technically. Adding \ before function does not help.

Expected behavior
No highlight, since only array can be returned by PHP

Environment details

PhpStorm 2024.1.1
Build #PS-241.15989.102, built on April 23, 2024
Licensed to simbiat.ru / Dmitry Kustov
Subscription is active until May 11, 2024.
For non-commercial open source development only.
Runtime version: 17.0.10+1-b1207.14 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 5120M
Cores: 16
Registry:
  debugger.new.tool.window.layout=true
  run.processes.with.pty=TRUE
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.jetbrains.space (241.15989.9)
  com.intellij.ml.llm (241.15989.102)
  com.kalessil.phpStorm.phpInspectionsEA (5.0.0.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant