aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2013-08-04 23:40:22 +0200
committerChristian Weiske <cweiske@cweiske.de>2013-08-04 23:40:22 +0200
commit0afefd0cc71d0c107edf371a6a3bdf5b3e36652f (patch)
tree25d8d1b7662aa62438f72c2d6a9784228a498a9c /src
parent909438ab44337ef0aac15b34d53390a6ab1a252d (diff)
downloadauerswald-callnotifier-0afefd0cc71d0c107edf371a6a3bdf5b3e36652f.tar.gz
auerswald-callnotifier-0afefd0cc71d0c107edf371a6a3bdf5b3e36652f.zip
fix space between last date and number
Diffstat (limited to 'src')
-rw-r--r--src/callnotifier/Logger/CallFileTop.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/callnotifier/Logger/CallFileTop.php b/src/callnotifier/Logger/CallFileTop.php
index 4fd8917..1412782 100644
--- a/src/callnotifier/Logger/CallFileTop.php
+++ b/src/callnotifier/Logger/CallFileTop.php
@@ -67,8 +67,13 @@ class Logger_CallFileTop extends Logger_CallBase
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;