From 1787604ac184ba9065d09c7403a39ce35da65d78 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 4 May 2014 09:12:23 +0200 Subject: [PATCH] Fixed filtering logs --- src/Api/Jobs/GetLogJob.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Api/Jobs/GetLogJob.php b/src/Api/Jobs/GetLogJob.php index efd203d5..49f13045 100644 --- a/src/Api/Jobs/GetLogJob.php +++ b/src/Api/Jobs/GetLogJob.php @@ -20,11 +20,11 @@ class GetLogJob extends AbstractPageJob $lines = explode(PHP_EOL, str_replace(["\r", "\n"], PHP_EOL, $lines)); $lines = array_reverse($lines); - if (!empty($filter)) + if (!empty($query)) { - $lines = array_filter($lines, function($line) use ($filter) + $lines = array_filter($lines, function($line) use ($query) { - return stripos($line, $filter) !== false; + return stripos($line, $query) !== false; }); }