From 814ad87e4ad53ae0dd9a52df0f626755cca58379 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 24 Jun 2023 16:23:03 -0700 Subject: [PATCH] Standalone bootstrap - Guard against variations in trailing / --- CRM/Utils/System/Standalone.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System/Standalone.php b/CRM/Utils/System/Standalone.php index 394bfac09b..0b921fa6d4 100644 --- a/CRM/Utils/System/Standalone.php +++ b/CRM/Utils/System/Standalone.php @@ -288,12 +288,12 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { return TRUE; } - $root = $this->cmsRootPath(); + $root = rtrim($this->cmsRootPath(), '/' . DIRECTORY_SEPARATOR); if (empty($root) || !is_dir($root) || !chdir($root)) { return FALSE; } - require_once $root . '../vendor/autoload.php'; /* assumes $root to be the _web_ root path, not the project root path. */ + require_once $root . '/../vendor/autoload.php'; /* assumes $root to be the _web_ root path, not the project root path. */ // seems like we've bootstrapped drupal $config = CRM_Core_Config::singleton(); -- 2.25.1