if (isset($arLines[0]) && $arLines[0] == $date) {
//same date as previous log entry
$arLines = array_pad($arLines, -count($arLines) - 1, '');
+ } else if (!isset($arLines[0])) {
+ //empty file
+ $arLines = array_pad($arLines, -count($arLines) - 2, '');
} else {
+ //new date
$arLines = array_pad($arLines, -count($arLines) - 3, '');
+ $arLines[2] = "\n";
}
$arLines[0] = $date;
$arLines[1] = $logline;
if ($this->callTypes == 'io') {
$str .= $prefix;
- $str .= str_pad($numstr, 20);
+ $str .= Functions::mb_str_pad($numstr, 20);
} else {
- $str .= ' ' . str_pad($numstr, 25);
+ $str .= ' ' . Functions::mb_str_pad($numstr, 25);
}
$str .= ' ' . date('H:i:s', $call->end - $call->start - 3600);