I was notified by a customer of an error during the checkout process via PayPal. I tried it myself and received the following:
str_replace(): Passing null to parameter #3 (subject) of type array string is deprecated in Parsedown.php on line 32
What version of Backlight are you using?
Is everything up to date?
What version of php is your host using? (You can find out at Backlight > Admin > Special Links > View PHP Info)
I am using Backlight 4.1.2
PHP version 8.1.3
A couple of things to try:
First: On the Backlight Modules page, click on the Reinstall All link. Click on Reinstall for the Cart
(try this first in case there have been silent fixes in Backlight)
If that doesn’t fix it:
From your host’s CPanel, try reverting to an earlier version of php,
Will do. Is there a version I should switch too?
I switched back to PHP 8.0, reinstalled all the modules, and it’s now working.
@Ben I can confirm the error Kurt encountered happens with php 8.1.3
On my test site, with php 8.0.16 everything worked correctly. I changed it to php 8.1.3 and the error popped up in the PayPal portion of checking out.
Hi @rod_barbee and @Kurt, PHP 8.1 has proven quite problematic. We’ve had a couple of rounds of updates to address issues, and will now look to fix these issues.
Hi @Kurt, I haven’t been able to replicate this error message, however I’ve put in changes to the code that should address this and also fix the issue at Uploading full-sized image problem
Can you try reinstalling the main Backlight modules by clicking ‘Reinstall’ under ‘Backlight’ on the Backlight modules page?
Hi @Ben, did you also update the testing stream?
with php 8.1.3 in release stream, PayPal checkout is working
This issue has reared its ugly head again… When trying to complete a PayPal transaction, the following error message occurs:
Something went wrong
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Parsedown.php on line 30.
My site is currently using PHP version 8.1.25. We attempted to go to a newer version (8.2) and it gave the same error.
Are you still on BL4?
I wonder if your host updated php to be compatible with the latest parsedown. Just a guess.
Since this thread was first started, BL 5 has been released, so I don’t know that BL4 will be updated to be compatible with latest version of Parsedown.
But Parsedown was just updated in BL5.
If you want to upgrade to BL5, Matt has just made it easier.
I’m currently on BL5, and I’m current on all the updates.
At what point is the error occurring?
On my test site I can get all the way to PayPal. I haven’t tried actually completing the purchase though.
My host is using php 8.2.12
It’s happening once you’re on the PayPal screen to make the payment. When you click to make the payment, the PayPal screen shows it’s trying to pay, and then the error message occurs. The payment never completes.
I’m unable to replicate the problem. I completed a purchase on my test site and it went through fine.
I think @Ben will need to take a look
Hi @Kurt, I found that the updated Parsedown needed an additional check on the value being passed. I’ve put in a silent fix, which can be applied by visiting Backlight Modules and clicking ‘Reinstall’ for
I suspect though that while this will get past this particular error, that it won’t solve the underlying issue with your PayPal setup. Can you report back with any further issues after updating