You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mago analyze flags possibly-undefined-int-array-index, possibly-null-argument, and possibly-null-operand around $insertStart[$j] in processAddColumns()/processChangeColumns(). $insertStart is returned by getSqlInsertOffsets() with a guaranteed array{0: int, 1: int, 2: int, 3: int} shape, and $j only ever takes values 0-3 (set via the switch in the outer loop, then incremented by for (; $j < $insertStartCount; ++$j)). mago cannot correlate the for loop's incrementing bound against the array's guaranteed size, the same class of limitation already documented for Statement.php (#61) and Result.php's dereference loop (#66).
These findings will be captured in a mago baseline rather than fixed or suppressed inline.
Closing as resolved. The \[\] loop-bound findings were resolved by the decorator fixes (4e2c1fc, d052760); AlterTableDecorator.php no longer appears in the committed analysis-baseline.toml.
Activity
mago analyze: fix real bugs in AlterTableDecorator.php
mago analyze: fix real bugs in CreateTableDecorator.php
tyrsson commentedon Oct 7, 2026
Closing as resolved. The
\[\]loop-bound findings were resolved by the decorator fixes (4e2c1fc, d052760);AlterTableDecorator.phpno longer appears in the committedanalysis-baseline.toml.