I am currently using Paypal checkout through omnipay for payment processing for civievents. I moved the payment processor to appear at the confirm screen rather than the register screen. After doing that, it gives a WordPress critical error whenever I hit register. Looking at the code/logs, it seems like the preapprove array is null/empty. Everything worked fine when the payment processor was on the register screen. Has anyone seen this? I am using the latest civicrm, omnipay, and wordpress. I tried php 8, 8.1, and 7.4.
Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /homepages/----/----/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php:548
Argument #2 is the preapprove array.
Edit: I did some more messing around with this issue and it seems like registering multiple participants at once also results in this error.