From 0024b67aaf1b5fd79a2e73789a4c903364162e54 Mon Sep 17 00:00:00 2001 From: Ko- Date: Sat, 11 Mar 2017 17:04:21 +0100 Subject: Check that set_time_limit is not disabled before calling it Signed-off-by: Ko- --- lib/private/legacy/files.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/private/legacy/files.php') diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php index 8c9adad0d49..ed3aa719409 100644 --- a/lib/private/legacy/files.php +++ b/lib/private/legacy/files.php @@ -147,7 +147,9 @@ class OC_Files { $streamer->sendHeaders($name); $executionTime = intval(OC::$server->getIniWrapper()->getNumeric('max_execution_time')); - set_time_limit(0); + if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { + @set_time_limit(0); + } ignore_user_abort(true); if ($getType === self::ZIP_FILES) { foreach ($files as $file) { -- cgit v1.2.3