Skip to content

Commit

Permalink
Merge pull request #24602 from civicrm/5.54
Browse files Browse the repository at this point in the history
5.54 to master
  • Loading branch information
eileenmcnaughton authored Sep 24, 2022
2 parents 122c5ea + b630856 commit 17f2c5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Civi/Core/ClassScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ public static function scanFolders(array &$classes, string $classRoot, string $c
}
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.
\Civi::log('class_scanner')->warning("Scanned file {$relFile} for class {$class}, but it was not found.");
// throw new \RuntimeException("Scanned file {$relFile} for class {$class}, but it was not found.");
// We can't throw an exception since it breaks some test environments. We can't log because this happens too early and it leads to an infinite loop. error_log() works but is debatable if anyone will look there.
}
}
}
Expand Down

0 comments on commit 17f2c5a

Please sign in to comment.