robertbell Posted Thursday at 09:26 PM Share Posted Thursday at 09:26 PM I'm using credit card capture (I know) and after upgrading to CubeCart 6.5.1 (from 6.4.10) and PHP 8.1 I get the following error when placing a test order: [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:138 - implode(): Argument #2 ($array) must be of type ?array, bool given https://www.sojourner.biz/index.php?_a=gateway Am I missing a PHP extension? Quote Link to comment Share on other sites More sharing options...
bsmither Posted Friday at 01:09 AM Share Posted Friday at 01:09 AM Please try this: In the Card_Capture module, gateway.class.php, at line 138, find THIS PART: = implode(' ',unserialize($item['product_options'])); Change THIS PART to: = implode(' ',unserialize($item['product_options']) ?: array()); PHP 8.1 is much more picky about what is required vs. what is given. If $item['product_options'] cannot be unserialized, a false is returned, which cannot be used with implode(). The added code will determine if unserialize() returns false, and if so, will give an empty array to implode(). I have not tested this. Quote Link to comment Share on other sites More sharing options...
robertbell Posted Friday at 02:21 AM Author Share Posted Friday at 02:21 AM Thanks. I'll let you know how it goes. Yep. Works for me. Thanks, as always. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.