Skip to content

Commit

Permalink
🩹 BUGFIX] - Undefined array key - check whether the array key $parent…
Browse files Browse the repository at this point in the history
…Class exists or not
  • Loading branch information
Philipp Kuhlmay committed Mar 17, 2023
1 parent b9b7bc4 commit fbbaa84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Domain/Model/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ public function getClassHierarchy(): ?array
if (strpos($parentClass, '\\') === 0) {
$parentClass = substr($parentClass, 1);
}
if (!is_array($classHierarchy[$parentClass])) {
// Check whether the array key exists
if (!isset($classHierarchy[$parentClass]) || !is_array($classHierarchy[$parentClass])) {
$classHierarchy[$parentClass] = [];
}
$classHierarchy[$parentClass][] = $domainObject;
Expand Down

0 comments on commit fbbaa84

Please sign in to comment.