summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-26 10:25:09 +0100
committerGitHub <noreply@github.com>2018-01-26 10:25:09 +0100
commita7ad7cb08e80ba64bbd7199517a974ff27025558 (patch)
treed3af83c565c71954fa33fcdc02497c415df1d23c /apps
parentc2b1bd92d6f6e675f7ffab420cd61c5be701c4a6 (diff)
parente6efa755c9a8c6a6a4cc0faaffc23aea049d8298 (diff)
downloadnextcloud-server-a7ad7cb08e80ba64bbd7199517a974ff27025558.tar.gz
nextcloud-server-a7ad7cb08e80ba64bbd7199517a974ff27025558.zip
Merge pull request #8053 from nextcloud/simplify-substr
Use short for of substr to not need strlen()
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 6b8a441f7b3..d798312fda3 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