Skip to content

Commit

Permalink
Qual: PhanCompatibleNegativeStringOffset must be suppressed
Browse files Browse the repository at this point in the history
# Qual: PhanCompatibleNegativeStringOffset must be suppressed

Apparently the PhanCompatibleNegativeStringOffset notice can not be avoided
through the '>=1' condition hint, so suppress it explicitly
  • Loading branch information
mdeweerd committed Mar 8, 2024
1 parent bb6cf2c commit af71675
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions htdocs/core/lib/json.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ function dol_json_decode($json, $assoc = false)
} else {
$out .= $json[$i];
}
// @phan-suppress-next-line PhanCompatibleNegativeStringOffset
if ($i >= 1 && $json[$i] == '"' && $json[$i - 1] != "\\") {
$comment = !$comment;
}
Expand Down

0 comments on commit af71675

Please sign in to comment.