Hi all,
I am getting this error when I run Permission Checks in the Control panel:
Fatal error: Uncaught TypeError: readdir(): Argument #1 ($dir_handle) must be of type resource or null, false given in /home/public_html/forum/admin/fileperms.php:154 Stack trace: #0 /home/public_html/forum/admin/fileperms.php(154): readdir() #1 {main} thrown in /home/public_html/forum/admin/fileperms.php on line 154
From file line 149 to 163
$results = [];
foreach ($dirs as $k => $v) {
$results[$v]['header'] = "<span style='color:green;'>OK</span>";
$results[$v]['checks'] = "";
$dir = @opendir("../$v");
while ($file = @readdir($dir)) {
if ($file == "..") {
continue;
}
if (is_writeable("../$v/$file")) {
$status = "<span style='color:green;'>OK</span>";
} else {
$status = "<span style='color:red;'>FAIL</span>";
$results[$v]['header'] = "<span style='color:red;'>FAIL</span>";
}
Any assistance on how to fix this error would be appreciated.