Hi all,
I use pdoTools / pdoResources these days but I have a lot of existing older sites that use getResources.
With the release of MODX 2.8.2 I’ve been testing out upgrading MODX and also upgrading PHP to PHP8.
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);
}
I guess my question is, is getResources still maintained by the author? Will it be updated?
If it was just one site I’d maybe look at fixing the code myself but if the extra is abandoned I’d likely rewrite the sites to use pdoResources.
Many thanks in advance for any thoughts / wisdom!
Chris