Skip to content

False positive for JSON security hardening when using named argument for flags #1972

Open
@sandacode

Description

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

Current behaviour

json_decode('[]', flags: JSON_THROW_ON_ERROR);
>> [EA] Please consider taking advantage of JSON_THROW_ON_ERROR flag for this call options. 

Expected behaviour
--
json_decode('[]', flags: JSON_THROW_ON_ERROR);
>> EA does not report an issue

Environment details
---
PHPStorm 2024.3.5
Build #PS-243.26053.13, built on March 12, 2025
MacOS 15.3.2 (24D81) / Apple Silicon
Runtime version: 21.0.6+8-b631.39 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions