From 78b661dcf6fa931c8324b65672e00fdcc585b9c0 Mon Sep 17 00:00:00 2001 From: Lee Bradley Date: Wed, 9 Nov 2022 15:36:10 +0000 Subject: [PATCH] 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 --- src/ORM/RelatedData/StandardRelatedDataService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/RelatedData/StandardRelatedDataService.php b/src/ORM/RelatedData/StandardRelatedDataService.php index 2c3eab624..04501fc23 100644 --- a/src/ORM/RelatedData/StandardRelatedDataService.php +++ b/src/ORM/RelatedData/StandardRelatedDataService.php @@ -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; }