1
0
Fork 0

Updated roagen.php

This commit is contained in:
netravnen 2018-12-10 20:40:44 +01:00 committed by Christoffer
parent f7566c8c52
commit 58e0219fae
1 changed files with 6 additions and 3 deletions

View File

@ -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')) {