We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db1c2a5 + e81eaf4 commit bcb1fc5Copy full SHA for bcb1fc5
apps/files_external/lib/Lib/Storage/SFTP.php
@@ -327,6 +327,9 @@ public function opendir($path) {
327
public function filetype($path) {
328
try {
329
$stat = $this->getConnection()->stat($this->absPath($path));
330
+ if (!is_array($stat) || !array_key_exists('type', $stat)) {
331
+ return false;
332
+ }
333
if ((int) $stat['type'] === NET_SFTP_TYPE_REGULAR) {
334
return 'file';
335
}
0 commit comments