You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Loader::loadClass
public static function loadClass($class) {
$class_file = str_replace('\\', '/', str_replace('_', '/', $class)).'.php';
foreach (self::$dirs as $dir) {
$file = $dir.'/'.$class_file;
if (file_exists($file)) {
require $file;
return;
}
}
trigger_error(sprintf('Class %s not found', $class), E_USER_ERROR); #handle class not found
# throw new \ErrorException(sprintf('Class %s not found', $class), E_USER_ERROR);
}
Flight intentionally does not throw an error when it can't find a class. This is because PHP class_exists function tries to autoload class by default and throwing an error causes issues with third party libraries. This seems like more of an issue with the router or dispatcher. I'll take a look.
Take from the doc:
Flight will output nothing, should have throw error/exception class not found..
The text was updated successfully, but these errors were encountered: