X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FClassLoader.php;h=b7fa50df7393d4e991ecf4533781d937461f9246;hb=491e51af3abb85d803cfb72cf0d8fbd5ecbf09cb;hp=f951e578c7a011534b28ec932f3b3e27207b0dd4;hpb=35e93e6ad119df822d538bed2a7d80cb3492d589;p=civicrm-core.git diff --git a/CRM/Core/ClassLoader.php b/CRM/Core/ClassLoader.php index f951e578c7..b7fa50df73 100644 --- a/CRM/Core/ClassLoader.php +++ b/CRM/Core/ClassLoader.php @@ -193,7 +193,7 @@ class CRM_Core_ClassLoader { // we do this to prevent a autoloader errors with joomla / 3rd party packages // Use absolute path, since we don't know the content of include_path yet. // CRM-11304 - $file = dirname(__FILE__) . '/../../packages/IDS/vendors/htmlpurifer/HTMLPurifier/Bootstrap.php'; + $file = dirname(__FILE__) . '/../../packages/IDS/vendors/htmlpurifier/HTMLPurifier/Bootstrap.php'; if (file_exists($file)) { return $file; } @@ -205,6 +205,12 @@ class CRM_Core_ClassLoader { * @param $class */ public function loadClass($class) { + if ($class === 'CiviCRM_API3_Exception') { + //call internal error class api/Exception first + // allow api/Exception class call external error class + // CiviCRM_API3_Exception + require_once 'api/Exception.php'; + } if ( // Only load classes that clearly belong to CiviCRM. // Note: api/v3 does not use classes, but api_v3's test-suite does