Check return of dir(). see #8478

git-svn-id: http://svn.automattic.com/wordpress/trunk@10051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-12-04 22:07:57 +00:00
parent 535db0f29a
commit 2780af1189
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;