diff --git a/library/Graphite/Graphing/Template.php b/library/Graphite/Graphing/Template.php index 0950fed..e804078 100644 --- a/library/Graphite/Graphing/Template.php +++ b/library/Graphite/Graphing/Template.php @@ -207,8 +207,13 @@ protected function combineMetrics( $allowedNextCurveMetricsPerCurrentCurveName = []; foreach ($currentCombination as $currentCurveName => $currentCurveMetric) { - $allowedNextCurveMetricsPerCurrentCurveName[$currentCurveName] - = $possibleCombinations[$currentCurveName][$nextCurveName][$currentCurveMetric]; + if (isset($possibleCombinations[$currentCurveName][$nextCurveName][$currentCurveMetric])) { + $allowedNextCurveMetricsPerCurrentCurveName[$currentCurveName] + = $possibleCombinations[$currentCurveName][$nextCurveName][$currentCurveMetric]; + } else { + $metricsCombinations[] = $currentCombination; + return; + } } $allowedNextCurveMetrics = $allowedNextCurveMetricsPerCurrentCurveName[$currentCurveName];