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:
parent
535db0f29a
commit
2780af1189
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue