Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/logreader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-12-22 19:07:25 +0300
committerRobin Appelman <robin@icewind.nl>2016-12-22 19:07:25 +0300
commit99b1dfe467ae46c606b3135d5f6a550d1c90fe37 (patch)
tree1b50781546a3a9b649d25a13b62ce01149b9e449 /lib
parenteb208c46a8a57a9ce08dffe37e6d0f4901097e3e (diff)
Stop iterating if we dont have a valid file handle
fixes #34
Diffstat (limited to 'lib')
-rw-r--r--lib/Log/LogIterator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Log/LogIterator.php b/lib/Log/LogIterator.php
index 6faba0f..b037bb5 100644
--- a/lib/Log/LogIterator.php
+++ b/lib/Log/LogIterator.php
@@ -102,6 +102,6 @@ class LogIterator implements \Iterator {
}
function valid() {
- return $this->position >= 0;
+ return $this->position >= 0 && is_resource($this->handle);
}
}