opengeek/getResources

getResources Breaks on PHP8

deJaya opened this issue · 1 comments

It seems that pages using getResources will break under PHP8.

This seems to be due to its use of the now-removed “each” function on line 416:

while (list($sort, $dir) = each($sorts)) {
            if ($sortbyEscaped) $sort = $modx->escape($sort);
            if (!empty($sortbyAlias)) $sort = $modx->escape($sortbyAlias) . ".{$sort}";
            $criteria->sortby($sort, $dir);
        }

Looks like #104 may already have a fix for this