mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #3904 from dhensby/pulls/class-exists-fix
FIX make class loader classExists check interface_exists as per docs
This commit is contained in:
commit
e3478e96fd
@ -95,13 +95,13 @@ class SS_ClassLoader {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if a class name exists in the manifest.
|
||||
* Returns true if a class or interface name exists in the manifest.
|
||||
*
|
||||
* @param string $class
|
||||
* @return bool
|
||||
*/
|
||||
public function classExists($class) {
|
||||
return class_exists($class, false) || $this->getItemPath($class);
|
||||
return class_exists($class, false) || interface_exists($class, false) || $this->getItemPath($class);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user