aboutsummaryrefslogtreecommitdiffstats
path: root/settings/Controller/CheckSetupController.php
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 /settings/Controller/CheckSetupController.php
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 'settings/Controller/CheckSetupController.php')
-rw-r--r--settings/Controller/CheckSetupController.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 016f6a1dab2..5e2aa365f67 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.php
@@ -286,6 +286,20 @@ class CheckSetupController extends Controller {
}
/**
+ * Checks if set_time_limit is not disabled.
+ *
+ * @return bool
+ */
+ private function isSettimelimitAvailable() {
+ if (function_exists('set_time_limit')
+ && strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* @return RedirectResponse
*/
public function rescanFailedIntegrityCheck() {
@@ -411,6 +425,7 @@ Raw output
'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
+ 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
]
);
}