-
Notifications
You must be signed in to change notification settings - Fork 826
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #73: Throw a RuntimeException when rawlist fails, this should b…
…e prevented in userland code.
- Loading branch information
1 parent
f0cd94b
commit 095f87d
Showing
2 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,6 +290,10 @@ protected function listDirectoryContents($directory, $recursive = true) | |
{ | ||
$listing = ftp_rawlist($this->getConnection(), $directory, $recursive); | ||
|
||
if ($listing === false) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
frankdejonge
Author
Member
|
||
throw new RuntimeException('Could not perform a rawlist on directory: '.$directory); | ||
} | ||
|
||
return $this->normalizeListing($listing, $directory); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it is not documented that
ftp_rawlist
might returnfalse
, see http://php.net/ftp_rawlist ?