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 PhanTypePossiblyInvalidDimOffset after array_key_exists #4850

Open
mdeweerd opened this issue Apr 10, 2024 · 0 comments
Open

Comments

@mdeweerd
Copy link

PhanTypePossiblyInvalidDimOffset Possibly invalid offset 'inputko' of $input of array type array{name?:null|string,value?:string,values?:string[],default?:string,label?:string,type?:string,size?:string,morecss?:string,moreattr?:string,style?:string,inputko?:int}
                    if (array_key_exists('inputko', $input) && $input['inputko'] == 1 && isset($input['name'])) {
                        array_push($inputko, $input['name']); 
                    }

I hoped that the array_key_exists test would validate that the 'inputko' offset is ok.

Phan 5.4.3
php-ast version 1.0.16
PHP version used to run Phan: 8.1.13

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