IcingaObject(legacy): Fix alignLegacyProperties for long attributes
refs #12919
This commit is contained in:
parent
e368b32ec6
commit
b9e4162635
|
@ -2085,11 +2085,13 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
foreach ($lines as &$line) {
|
||||
if (preg_match('/^\s{4}([^\t]+)\t+(.+)$/', $line, $m)) {
|
||||
if ($len - strlen($m[1]) < 0) {
|
||||
var_dump($m);
|
||||
exit;
|
||||
$fill = ' ';
|
||||
}
|
||||
else {
|
||||
$fill = str_repeat(' ', $len - strlen($m[1]));
|
||||
}
|
||||
|
||||
$line = ' ' . $m[1] . str_repeat(' ', $len - strlen($m[1])) . $m[2];
|
||||
$line = ' ' . $m[1] . $fill . $m[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue