Error Code Snippet:
This issue initially occurred when Magento upgraded from version 2.3.6 to version 2.4. During this update, Magento changed how it initializes storage. More specifically, storage initialization is now a wrapped function and is no longer available at a global level.
A patch was developed and released to resolve the issue. The fix was merged into Magento version 2.4.3.
Unfortunately, during the update to version 2.4.5, this fix was removed for unknown reasons, and the error returned.
Consult the resources below for context surrounding the issue’s cause and solution:
Please proceed only if you feel comfortable making manual changes to your Magento instance. Magento will likely re-release the issue’s fix in a future version.
As of Magento version 2.4.5 (October 2022), the fix is to manually apply a patch that reverses the previous fix’s removal. The patch content can be found here.
Simply add this to a patch file and follow these steps to add this to your Magento instance.