$Log = preg_replace(
"/(Use compression offset\s+:\s+\d+)/i",
"<span class="bad">$1",
$Log, 1, $Count
);
if ($Count) {
$this->account('Ripped with compression offset', false, 0);
}
Explanation:
the regex matches the line Use compression offset : N for any value of N, but only $Count (whether the line is present) is checked — the captured value is never read. As a result, Use compression offset : 0 (offset disabled, the normal case) triggers the same -100 point penalty as an actually active offset.
Repro: an EAC log containing Use compression offset : 0 → analyze output includes "Ripped with compression offset (-100 points)".
$Log = preg_replace(
"/(Use compression offset\s+:\s+\d+)/i",
"<span class="bad">$1",
$Log, 1, $Count
);
if ($Count) {
$this->account('Ripped with compression offset', false, 0);
}
Explanation:
the regex matches the line Use compression offset : N for any value of N, but only $Count (whether the line is present) is checked — the captured value is never read. As a result, Use compression offset : 0 (offset disabled, the normal case) triggers the same -100 point penalty as an actually active offset.
Repro: an EAC log containing Use compression offset : 0 → analyze output includes "Ripped with compression offset (-100 points)".