From eb1afb93b1c085d215c29e32cfb098b189eee829 Mon Sep 17 00:00:00 2001 From: Onyemenam Ndubuisi Date: Thu, 15 Aug 2019 10:00:16 +0100 Subject: [PATCH] fix API v3 exception class not found erro --- CRM/Core/ClassLoader.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Core/ClassLoader.php b/CRM/Core/ClassLoader.php index f951e578c7..51dbcf9b1d 100644 --- a/CRM/Core/ClassLoader.php +++ b/CRM/Core/ClassLoader.php @@ -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 -- 2.25.1