aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-03-16 12:27:26 +0100
committerGitHub <noreply@github.com>2017-03-16 12:27:26 +0100
commit57c1be8633103f2e2ca74bad186c332713f4ef83 (patch)
treea4b6b444ffcce7162ba8d2805ebc999526c9636b /core
parent7ca2f5f1374e2a1493c652772b4392f844346c52 (diff)
parent786ee72146773966ed774ee9a8128fbb2a2a713a (diff)
downloadnextcloud-server-57c1be8633103f2e2ca74bad186c332713f4ef83.tar.gz
nextcloud-server-57c1be8633103f2e2ca74bad186c332713f4ef83.zip
Merge pull request #3802 from Ko-/master
Check that set_time_limit is not disabled before calling it
Diffstat (limited to 'core')
-rw-r--r--core/ajax/update.php5
-rw-r--r--core/js/setupchecks.js8
2 files changed, 12 insertions, 1 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index fca40477d60..37abdc5dc3b 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -29,7 +29,10 @@
*/
use Symfony\Component\EventDispatcher\GenericEvent;
-set_time_limit(0);
+if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ @set_time_limit(0);
+}
+
require_once '../../lib/base.php';
$l = \OC::$server->getL10N('core');
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index fcbbba6af62..53b2e46f90a 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -160,6 +160,14 @@
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
+ if(!data.isSettimelimitAvailable) {
+ messages.push({
+ msg: t(
+ 'core',
+ 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. We strongly recommend enabling this function.'),
+ type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ });
+ }
} else {
messages.push({
msg: t('core', 'Error occurred while checking server setup'),