From 275c0d74cd68677622a5431505c5c870c473063d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 29 Mar 2026 21:40:15 +0000
Subject: [PATCH] =Seems to be working, huzzah! Added some changes for on-this-page nav
---
inc/registrar/fields/Field.php | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/inc/registrar/fields/Field.php b/inc/registrar/fields/Field.php
index e34c80e..add97be 100644
--- a/inc/registrar/fields/Field.php
+++ b/inc/registrar/fields/Field.php
@@ -131,16 +131,16 @@
public function getConfig():array{
$config = get_object_vars($this);
- $config = array_map(function ($item) {
+ return array_map(function ($item) {
if (is_a($item, Field::class)) {
return $item->getConfig();
} else if (is_array($item)) {
$temp = [];
- foreach ($item as $v) {
+ foreach ($item as $k => $v) {
if (is_a($v, Field::class)) {
- $temp[] = $v->getConfig();
+ $temp[$k] = $v->getConfig();
} else {
- $temp[] = $v;
+ $temp[$k] = $v;
}
}
return $temp;
@@ -148,7 +148,5 @@
return $item;
}
}, $config);
-
- return $config;
}
}
--
Gitblit v1.10.0