Check return of dir(). see #8478

git-svn-id: https://develop.svn.wordpress.org/trunk@10051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-04 22:07:57 +00:00
parent 1c84611441
commit 3bc3fc2f53
1 changed files with 3 additions and 1 deletions

View File

@ -232,7 +232,9 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
return false;
$ret = array();
$dir = dir($path);
$dir = @dir($path);
if ( ! $dir )
return false;
while (false !== ($entry = $dir->read()) ) {
$struc = array();
$struc['name'] = $entry;