FIX: Index fields for subclasses

The superclass was being checked for the field in each cycle of the loop, prohibiting the indexing of data fields from subclasses.
This commit is contained in:
GuySartorelli 2021-02-24 15:35:03 +13:00 committed by GitHub
parent de107616fb
commit e0bd30df67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ abstract class SearchIndex extends ViewableData
$type = null;
$fieldoptions = $options;
$fields = DataObject::getSchema()->databaseFields($class);
$fields = DataObject::getSchema()->databaseFields($dataclass);
if (isset($fields[$field])) {
$type = $fields[$field];