Skip to content

Commit 1e0ea34

Browse files
committed
refactor: remove unused key '_parent_name'
1 parent 45025a1 commit 1e0ea34

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

system/Database/BaseBuilder.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2705,8 +2705,7 @@ protected function objectToArray($object)
27052705
$array = [];
27062706

27072707
foreach (get_object_vars($object) as $key => $val) {
2708-
// There are some built in keys we need to ignore for this conversion
2709-
if (! is_object($val) && ! is_array($val) && $key !== '_parent_name') {
2708+
if (! is_object($val) && ! is_array($val)) {
27102709
$array[$key] = $val;
27112710
}
27122711
}
@@ -2732,13 +2731,10 @@ protected function batchObjectToArray($object)
27322731
$fields = array_keys($out);
27332732

27342733
foreach ($fields as $val) {
2735-
// There are some built in keys we need to ignore for this conversion
2736-
if ($val !== '_parent_name') {
2737-
$i = 0;
2734+
$i = 0;
27382735

2739-
foreach ($out[$val] as $data) {
2740-
$array[$i++][$val] = $data;
2741-
}
2736+
foreach ($out[$val] as $data) {
2737+
$array[$i++][$val] = $data;
27422738
}
27432739
}
27442740

0 commit comments

Comments
 (0)