diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-25 23:06:53 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 11:35:42 +0100 |
commit | c1e4f9f30563d5eda1718d716d631d6092cd4e28 (patch) | |
tree | 3bb7b6ef891cd80895d4c2c92252a4ccbc0c0cee /lib/private/legacy/files.php | |
parent | fe7e726ab228e6ddde7cf1442de9d0db193334a1 (diff) | |
download | nextcloud-server-c1e4f9f30563d5eda1718d716d631d6092cd4e28.tar.gz nextcloud-server-c1e4f9f30563d5eda1718d716d631d6092cd4e28.zip |
Use type casting instead of *val() method
It should be up to 6x faster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/legacy/files.php')
-rw-r--r-- | lib/private/legacy/files.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php index ba635d57627..24324bca095 100644 --- a/lib/private/legacy/files.php +++ b/lib/private/legacy/files.php @@ -148,7 +148,7 @@ class OC_Files { self::lockFiles($view, $dir, $files); $streamer->sendHeaders($name); - $executionTime = intval(OC::$server->getIniWrapper()->getNumeric('max_execution_time')); + $executionTime = (int)OC::$server->getIniWrapper()->getNumeric('max_execution_time'); if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { @set_time_limit(0); } @@ -344,7 +344,7 @@ class OC_Files { */ public static function setUploadLimit($size, $files = []) { //don't allow user to break his config - $size = intval($size); + $size = (int)$size; if ($size < self::UPLOAD_MIN_LIMIT_BYTES) { return false; } |