Skip to content
Snippets Groups Projects
Commit e6c9a7d1 authored by Tim Steiner's avatar Tim Steiner
Browse files

Avoid throwing a fatal error when viewing a UCC report for a month where at...

Avoid throwing a fatal error when viewing a UCC report for a month where at least one of the votes has not yet finished.
parent fd2a35c5
No related branches found
No related tags found
No related merge requests found
...@@ -153,6 +153,11 @@ class Ucc_ReportsController extends App_Controller_Action ...@@ -153,6 +153,11 @@ class Ucc_ReportsController extends App_Controller_Action
$voteResult = $aHistory->getDecision(); $voteResult = $aHistory->getDecision();
} }
// If we couldn't find a time in the history, this $approvalAction hasn't happened yet, so continue on.
if (!$time) {
continue;
}
if (!$originalCourse) { if (!$originalCourse) {
$originalCourse = $currentCourse; $originalCourse = $currentCourse;
} }
...@@ -163,6 +168,7 @@ class Ucc_ReportsController extends App_Controller_Action ...@@ -163,6 +168,7 @@ class Ucc_ReportsController extends App_Controller_Action
$voteResult = $approvalAction->tallyVotes($votes); $voteResult = $approvalAction->tallyVotes($votes);
} }
$data[] = new Unl_Model_Array(array( $data[] = new Unl_Model_Array(array(
'time' => $time->getTimestamp(), 'time' => $time->getTimestamp(),
'college' => $originalCourse->getCollege(), 'college' => $originalCourse->getCollege(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment