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:
Lee Bradley 2022-11-09 15:36:10 +00:00
parent e53380ce89
commit 78b661dcf6
No known key found for this signature in database
GPG Key ID: 2ECE2A4DE318E4DE

View File

@ -162,7 +162,7 @@ class StandardRelatedDataService implements RelatedDataService
$tableName = $this->dataObjectSchema->tableName($candidateClass);
break;
}
$candidateClass = get_parent_class($class ?? '');
$candidateClass = get_parent_class($candidateClass ?? '');
}
return $tableName;
}