VKCOM / noverify

Pretty fast linter (code static analysis utility) for PHP
MIT License
673 stars 57 forks source link

Panic when trying to unboxing variable that can be null #1214

Closed Hidanio closed 2 months ago

Hidanio commented 7 months ago

PHP Version: 7.4

OS: macOS (Sonoma 14.3)

The minimal code in which the bug appears:

<?php
declare(strict_types = 1);

function test() {
 $special_items = null;
 $test = [...$special_items];
}

Actual Behavior:

Panic while parsing XXXXX: runtime error: slice bounds out of range [5:4]

Expected Behavior:

No exceptions