From 750e42cc9d32699efbc6cb1c349a2653cbfcc54d Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Fri, 27 Mar 2026 10:22:36 +0100 Subject: [PATCH] refs #2913. Circular referente in output fixed --- src/Dto/Output/HardwareProfileOutput.php | 4 ++-- src/Dto/Output/NetworkSettingsOutput.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Dto/Output/HardwareProfileOutput.php b/src/Dto/Output/HardwareProfileOutput.php index 93a3b55..980d2e4 100644 --- a/src/Dto/Output/HardwareProfileOutput.php +++ b/src/Dto/Output/HardwareProfileOutput.php @@ -53,13 +53,13 @@ final class HardwareProfileOutput extends AbstractOutput )] public ?string $createdBy = null; - public function __construct(HardwareProfile $hardwareProfile) + public function __construct(HardwareProfile $hardwareProfile, bool $includeClient = true) { parent::__construct($hardwareProfile); $this->description = $hardwareProfile->getDescription(); $this->comments = $hardwareProfile->getComments(); - if($hardwareProfile->getClient()) { + if($includeClient && $hardwareProfile->getClient()) { $this->client = new ClientOutput($hardwareProfile->getClient()); } diff --git a/src/Dto/Output/NetworkSettingsOutput.php b/src/Dto/Output/NetworkSettingsOutput.php index d433c8f..e797034 100644 --- a/src/Dto/Output/NetworkSettingsOutput.php +++ b/src/Dto/Output/NetworkSettingsOutput.php @@ -189,7 +189,7 @@ final class NetworkSettingsOutput extends AbstractOutput } if ($networkSettings->getHardwareProfile()) { - $this->hardwareProfile = new HardwareProfileOutput($networkSettings->getHardwareProfile()); + $this->hardwareProfile = new HardwareProfileOutput($networkSettings->getHardwareProfile(), false); } if ($networkSettings->getOgLive()) { -- 2.40.1