mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-06 20:48:40 +00:00
Undo creating new sub arrays as this seems to be not required
This commit is contained in:
parent
a37dd5e792
commit
39b6f656f6
|
|
@ -95,17 +95,9 @@ final class ArrayUtils
|
||||||
if ($pathParts === false) {
|
if ($pathParts === false) {
|
||||||
throw new \Exception();
|
throw new \Exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
$pathPartCount = \count($pathParts);
|
|
||||||
$c = 1;
|
|
||||||
|
|
||||||
foreach ($pathParts as $key) {
|
foreach ($pathParts as $key) {
|
||||||
if (!isset($current[$key]) && $pathPartCount < $c) {
|
|
||||||
$current = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$current = &$current[$key];
|
$current = &$current[$key];
|
||||||
++$c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($overwrite) {
|
if ($overwrite) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user