vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Undefined constant - false positive inside if defined() block

Open migliori opened this issue 2 years ago • 0 comments

Hello,

Describe the bug PHP Constants throw the "Undefined constant" error but they shouldn't if they're inside an "if defined(...)" condition

To Reproduce

if (defined('MY_CONSTANT')) {
    echo MY_CONSTANT; // throws the false positive error
}

migliori avatar Sep 06 '22 10:09 migliori