mirror of
https://tildegit.org/sbgodin/HtmGem.git
synced 2023-08-25 13:53:12 +02:00
Passes on next line in case of error, and log error
When there are too many loops, indicating that something went wrong, sets the loop count to zero, the mode to default and go to the next line.
This commit is contained in:
parent
d5f569baa9
commit
6a37ecebcf
@ -89,7 +89,12 @@ foreach ($fileLines as $line) {
|
||||
$reDoCount = 0;
|
||||
$mode_textAttributes_temp = false;
|
||||
while (true) {
|
||||
if ($reDoCount>2) die("Too many loops: ".$mode);
|
||||
if ($reDoCount>2) {
|
||||
error_log("Too many loops, mode == '$mode'");
|
||||
$mode = null;
|
||||
$reDoCount = 0;
|
||||
break;
|
||||
}
|
||||
$reDoCount += 1;
|
||||
$line1 = substr($line, 0, 1); // $line can be modified
|
||||
$line2 = substr($line, 0, 2); // in the meantime.
|
||||
|
Loading…
Reference in New Issue
Block a user