Skip to content

How to use @filter correctly #1223

@plechev-64

Description

@plechev-64

PHP Version: 8.1
OS: Ubuntu

Hi, I try to test my custom rule with using @filter, like this:

function f()
{
    /**
     * @warning params of request without any check
     * @filter $_POST ^_POST$
     */
    $x = $_POST[$paramName];
}

but i find in result of test:

$x = $a['f']; 
$x = $_GET['test']; 
$x = $_REQUEST['test']; 
$a = $_POST['test']; 

i am waiting for only this

$a = $_POST['test']; 

why i have unexpectable results?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions