From 8a4c51893b345f7653e77acdd3667bbe61346784 Mon Sep 17 00:00:00 2001 From: Stevie Mayhew Date: Fri, 12 Jun 2015 08:52:41 +1200 Subject: [PATCH] FIX: allow for increase_time_limit_to to work if $_increase_time_limit_max is not yet set --- core/Core.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/Core.php b/core/Core.php index e55706d86..756941a1c 100644 --- a/core/Core.php +++ b/core/Core.php @@ -27,6 +27,9 @@ error_reporting(E_ALL | E_STRICT); */ require_once dirname(__FILE__).'/Constants.php'; +global $_increase_time_limit_max; +$_increase_time_limit_max = -1; + /** * Priorities definition. These constants are used in calls to _t() as an optional argument */ @@ -255,7 +258,7 @@ function translate_memstring($memString) { */ function increase_time_limit_to($timeLimit = null) { $max = get_increase_time_limit_max(); - if($max != -1 && $timeLimit > $max) return false; + if($max != -1 && $max != null && $timeLimit > $max) return false; if(!ini_get('safe_mode')) { if(!$timeLimit) { @@ -274,8 +277,6 @@ function increase_time_limit_to($timeLimit = null) { } } -$_increase_time_limit_max = -1; - /** * Set the maximum allowed value for {@link increase_timeLimit_to()}; *