diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 15:40:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 15:40:44 +0100 |
commit | 4c38d1ed01a180b2c086571ab1b6167c173c203b (patch) | |
tree | c0f5ffb382534fb468193f453499aa69c4aa5cf9 /lib/private/Files/View.php | |
parent | ca493ab5b1288d53f203d74117a8e636a606e633 (diff) | |
parent | 9ff51aafc518460e6c45996f09e9fe74e5f8d2e8 (diff) | |
download | nextcloud-server-4c38d1ed01a180b2c086571ab1b6167c173c203b.tar.gz nextcloud-server-4c38d1ed01a180b2c086571ab1b6167c173c203b.zip |
Merge pull request #8054 from nextcloud/substr-use-index
Use index based string access for substr with length of 1
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r-- | lib/private/Files/View.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index a6971cb0205..3ab3ed89e6b 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -696,7 +696,7 @@ class View { // do not allow deleting the root return false; } - $postFix = (substr($path, -1, 1) === '/') ? '/' : ''; + $postFix = (substr($path, -1) === '/') ? '/' : ''; $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path)); $mount = Filesystem::getMountManager()->find($absolutePath . $postFix); if ($mount and $mount->getInternalPath($absolutePath) === '') { @@ -1065,7 +1065,7 @@ class View { * @return bool|null|string */ public function hash($type, $path, $raw = false) { - $postFix = (substr($path, -1, 1) === '/') ? '/' : ''; + $postFix = (substr($path, -1) === '/') ? '/' : ''; $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path)); if (Filesystem::isValidPath($path)) { $path = $this->getRelativePath($absolutePath); @@ -1116,7 +1116,7 @@ class View { * \OC\Files\Storage\Storage for delegation to a storage backend for execution */ private function basicOperation($operation, $path, $hooks = [], $extraParam = null) { - $postFix = (substr($path, -1, 1) === '/') ? '/' : ''; + $postFix = (substr($path, -1) === '/') ? '/' : ''; $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path)); if (Filesystem::isValidPath($path) and !Filesystem::isFileBlacklisted($path) |