mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Prevent infinite loop when getting table name for ComponentID
If the field isn't in the first 2 classes then would just continue to loop Fix means it will continue going to parent classes Can be seen in the UsedOnTable in `admin` module if you have injected a new `Image` class that extends the built in one
This commit is contained in:
parent
e53380ce89
commit
78b661dcf6
@ -162,7 +162,7 @@ class StandardRelatedDataService implements RelatedDataService
|
|||||||
$tableName = $this->dataObjectSchema->tableName($candidateClass);
|
$tableName = $this->dataObjectSchema->tableName($candidateClass);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$candidateClass = get_parent_class($class ?? '');
|
$candidateClass = get_parent_class($candidateClass ?? '');
|
||||||
}
|
}
|
||||||
return $tableName;
|
return $tableName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user