Cfg/Fixup

* only throw errors if there is actually a config to work with. (like, not when you are just setting up for the first time)
 * do not use trigger_error() in CLI mode as it can cause a lockup as the error_handler tries to throw more errors.
 * assign lost validator fn flag to settings
 * also use validator onReset
This commit is contained in:
Sarjuuk
2024-06-04 16:58:03 +02:00
parent 5c1e9747c6
commit e734b41632
4 changed files with 80 additions and 14 deletions

View File

@@ -171,8 +171,7 @@ abstract class CLI
continue;
}
if (!$nCols)
$nCols = count($row);
$nCols = max($nCols, count($row));
for ($j = 0; $j < $nCols - 1; $j++) // don't pad last column
$pads[$j] = max($pads[$j] ?? 0, mb_strlen($row[$j] ?? ''));