From 5230c7a4a50cf84e7654a5a4aafea969d2afbf5a Mon Sep 17 00:00:00 2001 From: Barry O'Donovan Date: Mon, 27 Feb 2017 09:16:19 +0000 Subject: [PATCH] [BF] pre-init arrays --- app/Services/Grapher/Backend/Mrtg.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Services/Grapher/Backend/Mrtg.php b/app/Services/Grapher/Backend/Mrtg.php index 28403c208..2f07c9ced 100644 --- a/app/Services/Grapher/Backend/Mrtg.php +++ b/app/Services/Grapher/Backend/Mrtg.php @@ -125,12 +125,23 @@ public function generateConfiguration( IXP $ixp, int $type = self::GENERATED_CON * * array `['ixpports']` conataining the PhysicalInterface IDs of peering ports * * - * @param Entities\IXP $ixp The IXP to generate the config for (multi-IXP mode) + * @param \Entities\IXP $ixp The IXP to generate the config for (multi-IXP mode) * @return array */ public function getPeeringPorts( IXP $ixp ): array { $data = []; - $data['ixpports_maxbytes'] = 0; + $data['ixpports'] = []; + $data['ixpports_maxbytes'] = 0; + $data['infras'] = []; + $data['infraports'] = []; + $data['infraports_maxbytes'] = []; + $data['custs'] = []; + $data['custports'] = []; + $data['custlags'] = []; + $data['sws'] = []; + $data['swports'] = []; + $data['swports_maxbytes'] = []; + // we need to wrap switch ports in physical interfaces for switch aggregates and, as such, we need to use unused physical interface IDs $maxPiID = 0;