]> git.mxchange.org Git - friendica.git/commitdiff
Improve return value consistency in Util\BasePath::getPath
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 29 Jan 2023 03:19:47 +0000 (22:19 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 29 Jan 2023 03:19:47 +0000 (22:19 -0500)
src/Util/BasePath.php

index 1df92ea69c67d435a5ada167b83e238ce02b9cce..4811239295a36e421e1c4c9f209f545e5ed36449 100644 (file)
@@ -43,7 +43,7 @@ class BasePath
        }
 
        /**
-        * Returns the base filesystem path of the App
+        * Returns the base Friendica filesystem path without trailing slash
         *
         * It first checks for the internal variable, then for DOCUMENT_ROOT and
         * finally for PWD
@@ -71,7 +71,7 @@ class BasePath
                        throw new \Exception(sprintf('\'%s\' is not a valid basepath', $baseDir));
                }
 
-               return $baseDir;
+               return rtrim($baseDir, '/');
        }
 
        /**