You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you try to "Restore all" in the trash manager (tested on a PHP8.1 instance), this will fail.
Step to reproduce
See above.
Observed behavior
Nothing is restored, strange error dialog pops up in the trash manager:
Logfile shows:
ERROR: Uncaught Exception TypeError: "count(): Argument #1 ($value) must be of type Countable|array, null given" at /home/www/core/src/Revolution/Processors/Resource/Trash/Restore.php line 132
Expected behavior
The resource(s) should be restored. If that failed due to whatever, at least a better error message should be shown.
Root cause
One line of code is missing in the restore processor, which must initialize the $failures array (around line 79):
Bug report
Summary
When you try to "Restore all" in the trash manager (tested on a PHP8.1 instance), this will fail.
Step to reproduce
See above.
Observed behavior
Nothing is restored, strange error dialog pops up in the trash manager:
Logfile shows:
ERROR: Uncaught Exception TypeError: "count(): Argument #1 ($value) must be of type Countable|array, null given" at /home/www/core/src/Revolution/Processors/Resource/Trash/Restore.php line 132
Expected behavior
The resource(s) should be restored. If that failed due to whatever, at least a better error message should be shown.
Root cause
One line of code is missing in the restore processor, which must initialize the
$failures
array (around line 79):Environment
MODX version: 3.0.1-pl advanced,
PHP 8.1.11
The text was updated successfully, but these errors were encountered: