Skip to content

Commit

Permalink
Update wp.frontend and wp.backend to account for cases where CIVICRM_…
Browse files Browse the repository at this point in the history
…UF_BASEURL may or may not have a trailing slash
  • Loading branch information
kcristiano committed Oct 10, 2017
1 parent 6736b6f commit 3c88727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Civi/Core/Paths.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct() {
return \CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage();
})
->register('wp.frontend.base', function () {
return array('url' => CIVICRM_UF_BASEURL);
return array('url' => rtrim(CIVICRM_UF_BASEURL, '/') . '/');
})
->register('wp.frontend', function () use ($paths) {
$config = \CRM_Core_Config::singleton();
Expand All @@ -67,7 +67,7 @@ public function __construct() {
);
})
->register('wp.backend.base', function () {
return array('url' => CIVICRM_UF_BASEURL . 'wp-admin/');
return array('url' => rtrim(CIVICRM_UF_BASEURL, '/') . '/wp-admin/');
})
->register('wp.backend', function () use ($paths) {
return array(
Expand Down

0 comments on commit 3c88727

Please sign in to comment.