Update colona.v1.format.php

This commit is contained in:
Namhyeon Go 2019-09-25 15:47:54 +09:00 committed by GitHub
parent ecf6c9bca4
commit 96874a7cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,14 @@ if(!check_function_exists("decode_colona_format") {
foreach($lines as $line) {
$pos = strpos($line, $delimiter);
if($pos !== false) {
if($eof) {
if($line == "EOF;") {
$jobargs[$jobkey] = $jobvalue;
$eof = false;
} else {
$jobvalue .= $line;
}
} elseif($pos !== false) {
$jobkey = rtrim(substr($line, 0, $pos));
$jobvalue = ltrim(substr($line, $pos + strlen($delimiter)));
if($jobvalue == "<<<EOF") {
@ -24,13 +31,6 @@ if(!check_function_exists("decode_colona_format") {
} else {
$jobargs[$jobkey] = $jobvalue;
}
} elseif($eof) {
if($line == "EOF;") {
$jobargs[$jobkey] = $jobvalue;
$eof = false;
} else {
$jobvalue .= $line;
}
}
}