From 58e0219fae79cf4bebc22cc0dc9bb093fa896629 Mon Sep 17 00:00:00 2001 From: Christoffer Date: Mon, 10 Dec 2018 20:40:44 +0100 Subject: [PATCH] Updated roagen.php --- roagen.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/roagen.php b/roagen.php index 87a2991..9be752c 100755 --- a/roagen.php +++ b/roagen.php @@ -68,11 +68,12 @@ foreach($files as $file) $mask = $prefix[2]; } // extract var $maxLength - $maxLength = ''; // ensure var is null when starting new loop if (startsWith($line,'max-length')) { $maxLength = array(); preg_match('/([0-9]+)/',explode(':', $line)[1], $maxLength); - $maxLength = (empty($maxLength[1]) ? '' : $maxLength[1]); + $maxLength = $maxLength[1]; + } else { + $maxLength = ''; } // extract var $asn if (startsWith($line, 'origin')) { @@ -149,7 +150,9 @@ foreach($files as $file) if (startsWith($line,'max-length')) { $maxLength = array(); preg_match('/([0-9]+)/',explode(':', $line)[1], $maxLength); - $maxLength = (empty($maxLength[1]) ? '' : $maxLength[1]); + $maxLength = $maxLength[1]; + } else { + $maxLength = ''; } // extract var $asn if (startsWith($line, 'origin')) {