1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 06:20:56 +01:00

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
This commit is contained in:
Burak Yigit Kaya 2016-03-10 18:14:22 -08:00 committed by epriestley
parent 68b468a846
commit 60b42750b6
2 changed files with 10 additions and 0 deletions

View file

@ -190,6 +190,12 @@ abstract class DifferentialController extends PhabricatorController {
}
}
// Cast duration to a float since it used to be a string in some
// cases.
if (isset($map['duration'])) {
$map['duration'] = (double)$map['duration'];
}
return $map;
}

View file

@ -1078,6 +1078,10 @@ final class DifferentialRevisionViewController extends DifferentialController {
return null;
}
if (!$diff->getBuildable()) {
return null;
}
$interesting_messages = array();
foreach ($diff->getUnitMessages() as $message) {
switch ($message->getResult()) {