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
Found a problem on a MODX Cloud site today that was using PHP 8.1 related to binary resources and the resource in question not having the ACLs required to be accessed.
The problem is in core/components/awss3mediasource/model/awss3mediasource/awss3mediasource.class.php on line 341.
The error suppression on the fread no longer works in PHP 8+ and will cause a fatal PHP error that stops any of the resources loading in the Media Source view in the Manager when the file being processed returns false from the fopen - for example, a 403 Forbidden response.
My fix was to add an explicit check right after the fopen:
if ($fh == false) { return false;}
That way, processing continues and valid resources will still be able to be displayed.
The text was updated successfully, but these errors were encountered:
Found a problem on a MODX Cloud site today that was using PHP 8.1 related to binary resources and the resource in question not having the ACLs required to be accessed.
The problem is in
core/components/awss3mediasource/model/awss3mediasource/awss3mediasource.class.php
on line 341.The error suppression on the
fread
no longer works in PHP 8+ and will cause a fatal PHP error that stops any of the resources loading in the Media Source view in the Manager when the file being processed returns false from thefopen
- for example, a 403 Forbidden response.My fix was to add an explicit check right after the
fopen
:That way, processing continues and valid resources will still be able to be displayed.
The text was updated successfully, but these errors were encountered: