Updated roagen.php

This commit is contained in:
netravnen 2018-12-10 20:40:44 +01:00 committed by Christoffer
parent f7566c8c52
commit 58e0219fae

View file

@ -68,11 +68,12 @@ foreach($files as $file)
$mask = $prefix[2]; $mask = $prefix[2];
} }
// extract var $maxLength // extract var $maxLength
$maxLength = ''; // ensure var is null when starting new loop
if (startsWith($line,'max-length')) { if (startsWith($line,'max-length')) {
$maxLength = array(); $maxLength = array();
preg_match('/([0-9]+)/',explode(':', $line)[1], $maxLength); preg_match('/([0-9]+)/',explode(':', $line)[1], $maxLength);
$maxLength = (empty($maxLength[1]) ? '' : $maxLength[1]); $maxLength = $maxLength[1];
} else {
$maxLength = '';
} }
// extract var $asn // extract var $asn
if (startsWith($line, 'origin')) { if (startsWith($line, 'origin')) {
@ -149,7 +150,9 @@ foreach($files as $file)
if (startsWith($line,'max-length')) { if (startsWith($line,'max-length')) {
$maxLength = array(); $maxLength = array();
preg_match('/([0-9]+)/',explode(':', $line)[1], $maxLength); preg_match('/([0-9]+)/',explode(':', $line)[1], $maxLength);
$maxLength = (empty($maxLength[1]) ? '' : $maxLength[1]); $maxLength = $maxLength[1];
} else {
$maxLength = '';
} }
// extract var $asn // extract var $asn
if (startsWith($line, 'origin')) { if (startsWith($line, 'origin')) {