Whenever cron is manually run (admin/reports/status/run-cron) via a domain of a multisite, following error occurs repeatedly:

warning: Invalid argument supplied for foreach() in /{path}/sites/all/modules/md5check/md5check.module on line 56.

The function of line 56, which starts with "foreach":

function md5check_rglob($pattern, $flags = 0, $path = '') {
    if (!$path && ($dir = dirname($pattern)) != '.') {
        if ($dir == '\\' || $dir == '/') $dir = '';
        return md5check_rglob(basename($pattern), $flags, $dir . '/');
    }
    $paths = glob($path . '*', GLOB_ONLYDIR | GLOB_NOSORT);
    $files = glob($path . $pattern, $flags);
    foreach ($paths as $p) $files = array_merge($files, md5check_rglob($pattern, $flags, $p . '/'));
    return $files;
}

Comments

Pedja Grujić’s picture

Version: 6.x-1.0 » 7.x-1.x-dev
Assigned: Unassigned » Pedja Grujić
Category: bug » feature
Priority: Critical » Normal

6.x branch is minimally maintained, moving this as feature request for branch 7.x.