Added an exception when passing an invalid object to ApcClassLoader
This commit is contained in:
parent
f5cb167554
commit
f1f1494bbf
@ -58,6 +58,10 @@ class ApcClassLoader
|
||||
throw new \RuntimeException('Unable to use ApcUniversalClassLoader as APC is not enabled.');
|
||||
}
|
||||
|
||||
if (!method_exists($classFinder, 'findFile')) {
|
||||
throw new \InvalidArgumentException('The class finder must implement a "findFile" method.');
|
||||
}
|
||||
|
||||
$this->prefix = $prefix;
|
||||
$this->classFinder = $classFinder;
|
||||
}
|
||||
|
Reference in New Issue
Block a user