CRM-19914 - civicrmHooks.php issues on windows
authorfliespl <a.rzadkowolski@gmail.com>
Sun, 5 Feb 2017 12:13:40 +0000 (13:13 +0100)
committerGitHub <noreply@github.com>
Sun, 5 Feb 2017 12:13:40 +0000 (13:13 +0100)
The problem is that on Windows path might resolve differently, because of notation. Problem is that even if file exists it will not be included (silent error ignore) in specific cases (directory names).

CRM/Utils/Hook/WordPress.php

index 47164d3952cc27b5604225e5d5ab10db65aaee3a..977a746c2398e22cf03038539cb3b6084cc5bbe2 100644 (file)
@@ -179,7 +179,7 @@ class CRM_Utils_Hook_WordPress extends CRM_Utils_Hook {
         if (!empty($config->customPHPPathDir) &&
           file_exists("{$config->customPHPPathDir}/civicrmHooks.php")
         ) {
-          @include_once 'civicrmHooks.php';
+          @include_once "{$config->customPHPPathDir}/civicrmHooks.php";
         }
 
         // initialise with the pre-existing 'wordpress' prefix