@@ -101,7 +101,7 @@ public function size($path, $name)
101101$ this ->_connect ();
102102
103103$ statinfo = @ssh2_sftp_stat ($ this ->_sftp ,$ this ->_getPath ($ path ,$ name ));
104- if (( $ size =$ statinfo ['size ' ]) ===false ) {
104+ if ( ( $ statinfo === false ) or (( $ size =$ statinfo ['size ' ]) ===false ) ) {
105105throw new Horde_Vfs_Exception (sprintf ('Unable to check file size of "%s". ' ,$ this ->_getPath ($ path ,$ name )));
106106 }
107107
@@ -260,7 +260,7 @@ public function isFolder($path, $name)
260260/* See if we can stat the remote filename. ANDed with 040000 is true
261261 * if it is a directory. */
262262$ statinfo = @ssh2_sftp_stat ($ this ->_sftp ,$ this ->_getPath ($ path ,$ name ));
263- return $ statinfo ['mode ' ] &040000 ;
263+ return ( $ statinfo !== false ) and ( $ statinfo ['mode ' ] &040000 ) ;
264264 }
265265
266266/**
@@ -865,12 +865,8 @@ protected function _recv($remote, $local)
865865 */
866866protected function _wrap ($ remote )
867867 {
868- $ wrapper ='ssh2.sftp:// ' .$ this ->_params ['username ' ] .': '
869- .$ this ->_params ['password ' ] .'@ ' .$ this ->_params ['hostspec ' ];
870- if (!empty ($ this ->_params ['port ' ])) {
871- $ wrapper .=': ' .$ this ->_params ['port ' ];
872- }
873- if ($ remote {0 } !='/ ' ) {
868+ $ wrapper ='ssh2.sftp:// ' .intval ($ this ->_sftp );
869+ if ($ remote [0 ] !='/ ' ) {
874870$ remote =$ this ->getCurrentDirectory () .'/ ' .$ remote ;
875871 }
876872return $ wrapper .$ remote ;