1.2.702. Missing Assignation In Branches¶
A variable is assigned in one of the branch, but not the other. Such variable might be needed later, and when going throw this branch, it won’t be available.
In this analysis, elseif() and branches that return or goto somewhere else are omitted.
<?php
if ($condition) {
$a = 1;
$b = 2;
} else {
$a = 3;
}
// $b might be missing
?>