mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Fix strlen(null) in DifferentialChangesetViewController loadCoverage()
Summary: DifferentialChangesetViewController loadCoverage() fails under PHP 8.1 when test coverage is provided for some but not all modified files. Update the code to replace strlen() with phutil_nonempty_string(). Fixes T15521 Test Plan: View a diff with test coverage for some but not all files. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15521 Differential Revision: https://we.phorge.it/D25328
This commit is contained in:
parent
f7dd8f579a
commit
8cbbc9f961
1 changed files with 2 additions and 3 deletions
|
@ -451,10 +451,9 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
continue;
|
||||
}
|
||||
$coverage_data = idx($test_coverage, $changeset->getFileName());
|
||||
if (!strlen($coverage_data)) {
|
||||
continue;
|
||||
if (phutil_nonempty_string($coverage_data)) {
|
||||
$coverage[] = $coverage_data;
|
||||
}
|
||||
$coverage[] = $coverage_data;
|
||||
}
|
||||
|
||||
if (!$coverage) {
|
||||
|
|
Loading…
Reference in a new issue