From 56e252e786695f526e9cc274b9ec36189f436ed7 Mon Sep 17 00:00:00 2001 From: Mantas Varatiejus Date: Tue, 13 Jun 2017 21:59:38 +0300 Subject: [PATCH] Trim only new line characters from read log line --- .travis.yml | 2 +- LICENSE | 2 +- README.md | 2 +- src/LogIterator.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e71465..0271df1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ php: - 5.5 - 5.6 - 7.0 - - hhvm + - 7.1 install: - composer install --no-interaction --prefer-dist diff --git a/LICENSE b/LICENSE index 1abe720..d2060af 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015 Mantas Varatiejus +Copyright (c) 2015-2017 Mantas Varatiejus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 703b211..814c23b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This library can be found on [Packagist][1]. The recommended way to install this is through [Composer][2]: ```bash -composer require mvar/log-parser:dev-master +composer require mvar/log-parser:^1.0 ``` Basic Usage diff --git a/src/LogIterator.php b/src/LogIterator.php index f0c0861..e2f849d 100644 --- a/src/LogIterator.php +++ b/src/LogIterator.php @@ -100,7 +100,7 @@ protected function readLine() return; } - $buffer = trim($buffer); + $buffer = trim($buffer, "\n\r\0"); if (!$this->skipEmptyLines) { break;