diff --git a/lib/php/Converter.php b/lib/php/Converter.php index 6e91274..e914587 100644 --- a/lib/php/Converter.php +++ b/lib/php/Converter.php @@ -936,13 +936,11 @@ private function convertTo01(array $data): array } } if (isset($data['content']['network_device'])) { - foreach ($data['content']['network_device'] as &$netdev) { - if (isset($netdev['memory'])) { - $netdev['memory'] = $this->convertMemory($netdev['memory']); - } - if (isset($netdev['ram'])) { - $netdev['ram'] = $this->convertMemory($netdev['ram']); - } + if (isset($data['content']['network_device']['memory'])) { + $data['content']['network_device']['memory'] = $this->convertMemory($data['content']['network_device']['memory']); + } + if (isset($data['content']['network_device']['ram'])) { + $data['content']['network_device']['ram'] = $this->convertMemory($data['content']['network_device']['ram']); } }