diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 100b364ca06eb96d2cc0a6a62fe09a17d4b2fb1e..f90b2738d03f8651c98a9c5ca9d37743697ca922 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -715,7 +715,7 @@ class Filesystem {
 	 * @return string
 	 */
 	public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false) {
-		$cacheKey = $path.'-'.-$stripTrailingSlash.'-'.$isAbsolutePath;
+		$cacheKey = json_encode([$path, $stripTrailingSlash, $isAbsolutePath]);
 
 		if(isset(self::$normalizedPathCache[$cacheKey])) {
 			return self::$normalizedPathCache[$cacheKey];