Qual: Better hint for index value for phan (#28712)

# Qual: Better hint for index value for phan.

($i - 1) must be >= 0, so update test from $i>0 to $i>=1 .
This helps static analysis.
This commit is contained in:
MDW 2024-03-08 21:30:46 +01:00 committed by GitHub
parent d846044e38
commit f309d1634c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,7 +267,7 @@ function dol_json_decode($json, $assoc = false)
} else {
$out .= $json[$i];
}
if ($i > 0 && $json[$i] == '"' && $json[($i - 1)] != "\\") {
if ($i >= 1 && $json[$i] == '"' && $json[$i - 1] != "\\") {
$comment = !$comment;
}
}