From: Michael McAndrew Date: Thu, 15 Sep 2016 15:13:12 +0000 (+0100) Subject: Fix for CRM-19371 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b89b91545c29c718d7109c1d2d5ebbf74b5611e5;p=civicrm-core.git Fix for CRM-19371 --- diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 485280bd74..268373bad1 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -604,6 +604,9 @@ HTACCESS; // make everything absolute from the baseFilePath $basePath = ($basePath === NULL) ? self::baseFilePath() : $basePath; + // ensure that $basePath has a trailing slash + $basePath = (substr($basePath, -strlen(DIRECTORY_SEPARATOR)) != DIRECTORY_SEPARATOR) ? $basePath . DIRECTORY_SEPARATOR : $basePath; + return $basePath . $directory; }