fixed if fopen returns false typically on external storage
This commit is contained in:
parent
1d720099c3
commit
71a532fc4d
|
@ -541,7 +541,7 @@ class Util {
|
||||||
// we only need 24 byte from the last chunk
|
// we only need 24 byte from the last chunk
|
||||||
$data = '';
|
$data = '';
|
||||||
$handle = $this->view->fopen($path, 'r');
|
$handle = $this->view->fopen($path, 'r');
|
||||||
if (!fseek($handle, -24, SEEK_END)) {
|
if (is_resource($handle) && !fseek($handle, -24, SEEK_END)) {
|
||||||
$data = fgets($handle);
|
$data = fgets($handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue