From bd2bf925b76294261a65f5b4fc10f0c91c73f4da Mon Sep 17 00:00:00 2001 From: Daniel Richman Date: Tue, 22 Nov 2011 21:08:36 +0000 Subject: [PATCH] Check that the timestamp key exists first --- predict/includes/functions.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/predict/includes/functions.inc.php b/predict/includes/functions.inc.php index f7599c0..e86ae6c 100644 --- a/predict/includes/functions.inc.php +++ b/predict/includes/functions.inc.php @@ -95,7 +95,10 @@ function verifyModel( $pred_model, $software_available ) { } // Now check that the timestamp is within range - if ( $pred_model['timestamp'] > (time() + 180*3600) ) { + if ( !isset($pred_model['timestamp']) ) { + $return_array['valid'] = false; + $return_array['msg'] = "Launch time missing"; + } else if ( $pred_model['timestamp'] > (time() + 180*3600) ) { // More than 180 hours into future $return_array['valid'] = false; $return_array['msg'] = "A prediction cannot be run for a time that is