Skip to content

Commit

Permalink
Fix suggestions by @artonage
Browse files Browse the repository at this point in the history
Signed-off-by: Micke Nordin <kano@sunet.se>
  • Loading branch information
mickenordin authored and backportbot-nextcloud[bot] committed Aug 22, 2022
1 parent da6e0d7 commit 47fd27b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -628,17 +628,17 @@ public static function init() {
//this doesn´t work always depending on the webserver and php configuration.
//Let´s try to overwrite some defaults if they are smaller than 1 hour

if (intval(@ini_get('max_execution_time')?? 0) < 3600) {
if (intval(@ini_get('max_execution_time') ?? 0) < 3600) {
@ini_set('max_execution_time', strval(3600));
}

if (intval(@ini_get('max_input_time')?? 0) < 3600) {
if (intval(@ini_get('max_input_time') ?? 0) < 3600) {
@ini_set('max_input_time', strval(3600));
}

//try to set the maximum execution time to the largest time limit we have
if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
@set_time_limit(strval(max(intval(@ini_get('max_execution_time')),intval(@ini_get('max_input_time')))));
@set_time_limit(max(intval(@ini_get('max_execution_time')), intval(@ini_get('max_input_time'))));
}

self::setRequiredIniValues();
Expand Down

0 comments on commit 47fd27b

Please sign in to comment.