Permalink
Browse files

Fix PHP errors and warning in Issue Trends report

Fixes #23425
  • Loading branch information...
atrol committed Oct 2, 2017
1 parent bccb4a7 commit e3d2686a0ec34b584c94332f2699c47a932d7b3b
Showing with 8 additions and 3 deletions.
  1. +4 −1 plugins/MantisGraph/core/graph_api.php
  2. +4 −2 plugins/MantisGraph/pages/issues_trend_graph.php
@@ -420,7 +420,7 @@ function create_category_summary() {
/**
* Create cumulative graph by date
* @return array
* @return array | null
*/
function create_cumulative_bydate() {
$t_clo_val = config_get( 'bug_closed_status_threshold' );
@@ -497,6 +497,9 @@ function create_cumulative_bydate() {
$t_last_date = $t_date;
}
if ( $t_last_id == 0 ) {
return null;
}
ksort( $t_calc_metrics );
$t_last_opened = 0;
@@ -54,8 +54,10 @@
</h4>
</div>
<?php
$t_metrics = create_cumulative_bydate();
graph_cumulative_bydate( $t_metrics );
$t_metrics = create_cumulative_bydate();
if ( $t_metrics != null ) {
graph_cumulative_bydate( $t_metrics );
}
?>
</div>
</div>

0 comments on commit e3d2686

Please sign in to comment.