Skip to content

Commit 60b4275

Browse files
BYKepriestley
authored andcommitted
Cast old duration values for unit tests to float in DifferentialController
Summary: Fixes T10549. Test Plan: N/A Reviewers: #blessed_reviewers, avivey, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin Maniphest Tasks: T10549 Differential Revision: https://secure.phabricator.com/D15452
1 parent 68b468a commit 60b4275

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/applications/differential/controller/DifferentialController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ private function getModernUnitMessageDictionary(array $map) {
190190
}
191191
}
192192

193+
// Cast duration to a float since it used to be a string in some
194+
// cases.
195+
if (isset($map['duration'])) {
196+
$map['duration'] = (double)$map['duration'];
197+
}
198+
193199
return $map;
194200
}
195201

src/applications/differential/controller/DifferentialRevisionViewController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,10 @@ private function buildUnitMessagesView(
10781078
return null;
10791079
}
10801080

1081+
if (!$diff->getBuildable()) {
1082+
return null;
1083+
}
1084+
10811085
$interesting_messages = array();
10821086
foreach ($diff->getUnitMessages() as $message) {
10831087
switch ($message->getResult()) {

0 commit comments

Comments
 (0)