Skip to content

Commit

Permalink
Make sure to check if the directory is readable or not before trying …
Browse files Browse the repository at this point in the history
…to traverse it
  • Loading branch information
sbrajesh committed Nov 25, 2015
1 parent 685143e commit 5bc6a35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/common/mpp-common-functions.php
Expand Up @@ -1123,11 +1123,11 @@ function mpp_get_grid_column_class( $col ) {

function mpp_recursive_delete_dir( $dir ) {

if ( ! is_dir( $dir ) ) {
if ( ! is_dir( $dir ) || ! is_readable( $dir ) ) {
return false;
}

$items = scandir($dir);
$items = scandir( $dir );

foreach ( $items as $item ) {

Expand Down

0 comments on commit 5bc6a35

Please sign in to comment.