Skip to content

Commit

Permalink
Qual: PhanCompatibleNegativeStringOffset must be suppressed (#28720)
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 authored Mar 9, 2024
1 parent 3b57795 commit 4de7c67
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 4de7c67

Please sign in to comment.