summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-25 22:23:48 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-25 22:23:48 +0100
commite6efa755c9a8c6a6a4cc0faaffc23aea049d8298 (patch)
tree7ba7b5b28244ab996ae51d1fb8fa2f745ce2b6ab /apps
parentb9bbb894f8b01e000bb5e3a8a82db7bebad3ea00 (diff)
downloadnextcloud-server-e6efa755c9a8c6a6a4cc0faaffc23aea049d8298.tar.gz
nextcloud-server-e6efa755c9a8c6a6a4cc0faaffc23aea049d8298.zip
Use short for of substr to not need strlen()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_versions/lib/Storage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 4c76c5340fa..374eda2f91b 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -167,7 +167,7 @@ class Storage {
// to get the right target
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if ($ext === 'part') {
- $filename = substr($filename, 0, strlen($filename) - 5);
+ $filename = substr($filename, 0, -5);
}
// we only handle existing files