From 5d9bcf011d4705c18c78b43ce82becae6474d51d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 27 Jun 2017 20:46:59 -0700 Subject: [PATCH] CRM-19914 - CRM_Utils_Hook - Fix `civicrmHooks.php` on Joomla --- CRM/Utils/Hook.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index e486374055..1484a1fdaf 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -207,10 +207,11 @@ abstract class CRM_Utils_Hook { $this->commonIncluded = TRUE; $config = CRM_Core_Config::singleton(); - if (!empty($config->customPHPPathDir) && - file_exists("{$config->customPHPPathDir}/civicrmHooks.php") - ) { - @include_once "civicrmHooks.php"; + if (!empty($config->customPHPPathDir)) { + $civicrmHooksFile = CRM_Utils_File::addTrailingSlash($config->customPHPPathDir) . 'civicrmHooks.php'; + if (file_exists($civicrmHooksFile)) { + @include_once $civicrmHooksFile; + } } if (!empty($fnPrefix)) { -- 2.25.1