From 5ec12a91ddcaea8ca45d6fa19b7b029468ff7ac3 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 30 Oct 2016 20:07:17 -0400 Subject: [PATCH] Stop PHP from crashing if there aren't enough queries to make a graph --- data.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data.php b/data.php index 2e4d9ffc..7828f9fe 100644 --- a/data.php +++ b/data.php @@ -253,6 +253,10 @@ } function alignTimeArrays(&$times1, &$times2) { + if(count($times1) == 0 || count($times2) < 2) { + return; + } + $max = max(array_merge(array_keys($times1), array_keys($times2))); $min = min(array_merge(array_keys($times1), array_keys($times2)));