From 2517dd4a616eec018bd66b278d2fec14c59cc1f3 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 19 Nov 2013 23:13:10 +0100 Subject: [PATCH] Initing eof to false The call _stream_eof() must return a boolean, not null. Returning null makes PHP believe that the method wasn't implemented. Fixes #170 --- phpseclib/Net/SFTP/Stream.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index ba505022..0572c5c4 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -256,6 +256,7 @@ class Net_SFTP_Stream { $this->size = $this->sftp->size($path); $this->mode = preg_replace('#[bt]$#', '', $mode); + $this->eof = false; if ($this->size === false) { if ($this->mode[0] == 'r') {