modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 528 forks source link

Package manager should fail gracefully if package zip is corrupted #16454

Open muzzwood opened 1 year ago

muzzwood commented 1 year ago

Bug report

Summary

If a package is not downloaded completely or has been corrupted some other way, the "saving" modal animation will stay on screen forever.

Fatal error: Uncaught ValueError: Invalid or uninitialized Zip object in /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/Compression/xPDOZip.php on line 152

Step to reproduce

Try to install a corrupted package.

Observed behavior

There is no feedback to the user. It appears like it's just taking a long time.

Expected behavior

If possible, there should be an error communicated to the user.

Environment

MODX version 3.0.3

EMDM45 commented 6 months ago

I have the same error on modx 2.8.6, if i switch php version to 8.