fixed if fopen returns false typically on external storage

This commit is contained in:
Florin Peter 2013-05-28 20:50:14 +02:00
parent 1d720099c3
commit 71a532fc4d
1 changed files with 1 additions and 1 deletions

View File

@ -541,7 +541,7 @@ class Util {
// we only need 24 byte from the last chunk
$data = '';
$handle = $this->view->fopen($path, 'r');
if (!fseek($handle, -24, SEEK_END)) {
if (is_resource($handle) && !fseek($handle, -24, SEEK_END)) {
$data = fgets($handle);
}