Commit de54a39d authored by Lisa Seeto's avatar Lisa Seeto Committed by Gerrit Code Review
Browse files

Merge "Bug 1904349: count error on trying to clear non-existant directory"

parents 89eb1401 a7ddfb0f
......@@ -550,8 +550,8 @@ abstract class TestingUtil {
foreach ($characters as $c1) {
foreach ($characters as $c2) {
foreach ($characters as $c3) {
$content = scandir("$sessionpath/$c1/$c2/$c3");
if (count($content) > 2) {
$content = @scandir("$sessionpath/$c1/$c2/$c3");
if (is_array($content) && count($content) > 2) {
foreach($content as $file) {
if (!in_array($file, $ignore)) {
unlink("$sessionpath/$c1/$c2/$c3/$file");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment