mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
FIX Reset class from the actual SearchVariant instance to respect Injector
This commit is contained in:
parent
6fe21430e7
commit
831438fe9d
@ -105,6 +105,9 @@ abstract class SearchVariant
|
||||
$ref = new ReflectionClass($variantclass);
|
||||
if ($ref->isInstantiable()) {
|
||||
$variant = singleton($variantclass);
|
||||
// reassign actual class since Injector could be involved when creating the singleton
|
||||
$variantclass = get_class($variant);
|
||||
|
||||
if ($variant->appliesToEnvironment()) {
|
||||
$concrete[$variantclass] = $variant;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user