From 52f216ebfd1a7836b51e89233ecbdf71be7661ae Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 21 Sep 2022 14:01:03 +1200 Subject: [PATCH] Class scanner - do not throw runTime Exception if class not loaded --- Civi/Core/ClassScanner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Core/ClassScanner.php b/Civi/Core/ClassScanner.php index 5b318d056b..bc81ca7975 100644 --- a/Civi/Core/ClassScanner.php +++ b/Civi/Core/ClassScanner.php @@ -202,7 +202,7 @@ class ClassScanner { } elseif (!interface_exists($class) && !trait_exists($class)) { // If you get this error, then perhaps (a) you need to fix the name of file/class/namespace or (b) you should disable class-scanning. - throw new \RuntimeException("Scanned file {$relFile} for class {$class}, but it was not found."); + \Civi::log('class_scanner')->warning("Scanned file {$relFile} for class {$class}, but it was not found."); } } } -- 2.25.1