From 81541db892b17db0caf9b349bd807ef9efdb117d Mon Sep 17 00:00:00 2001 From: Ed Wilde Date: Wed, 13 Dec 2023 10:28:03 +1300 Subject: [PATCH 1/2] Remove unused line in `findTab()` This line doesn't appear to be of any use --- src/Forms/FieldList.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Forms/FieldList.php b/src/Forms/FieldList.php index f84b39135..be7095112 100644 --- a/src/Forms/FieldList.php +++ b/src/Forms/FieldList.php @@ -400,7 +400,6 @@ class FieldList extends ArrayList $currentPointer = $this; foreach ($parts as $k => $part) { - $parentPointer = $currentPointer; /** @var FormField $currentPointer */ $currentPointer = $currentPointer->fieldByName($part); } From b6c646ffbea586a9ffaa15e6d8fb27e5e14b683a Mon Sep 17 00:00:00 2001 From: Ed Wilde Date: Wed, 13 Dec 2023 10:42:06 +1300 Subject: [PATCH 2/2] Also remove the unused `$last_idx` assignment --- src/Forms/FieldList.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Forms/FieldList.php b/src/Forms/FieldList.php index be7095112..bdaabe384 100644 --- a/src/Forms/FieldList.php +++ b/src/Forms/FieldList.php @@ -395,7 +395,6 @@ class FieldList extends ArrayList public function findTab($tabName) { $parts = explode('.', $tabName ?? ''); - $last_idx = count($parts ?? []) - 1; $currentPointer = $this;