Page 1 of 1

Fraudlabs error

Posted: Wed Jul 28, 2021 2:23 am
by HenrysCat
Using the supplied FraudLabs Pro extensions, when marking an order as shipped I get this error

Unknown: Function create_function() is deprecated in /var/www/admin/controller/extension/fraud/fraudlabspro.php on line 328

Using PHP 7.4.21

Any ideas?
Thanks all

Re: Fraudlabs error

Posted: Wed Jul 28, 2021 2:45 am
by straightlight
I would suggest to use an extension from the Marketplace which provides more up-to-date support than the one provided from the core. You could also take a look at the Maintenance Branch version on Github Opencart for updated codes about this extension.

Re: Fraudlabs error

Posted: Wed Jul 28, 2021 2:47 am
by thekrotek
Or you could ask someone to fix this for you. Send me an email or message on Skype to support@thekrotek.com and we'll discuss this.

Re: Fraudlabs error

Posted: Wed Jul 28, 2021 5:22 am
by ADD Creative
It's just a message to tell you that create_function will be removed in future versions of PHP. As long as you have display errors switch off in all three places, it won't cause a problem.

To get rid of the error and be compatible with PHP 8, do a search replace create_function, there are loads of examples of how to replace with an anonymous function.

Re: Fraudlabs error

Posted: Thu Jul 29, 2021 1:31 am
by HenrysCat
ADD Creative wrote:
Wed Jul 28, 2021 5:22 am
As long as you have display errors switch off in all three places, it won't cause a problem.
Thanks, I found the setting under System > Settings > Server > Error Handling, but three places?

Re: Fraudlabs error

Posted: Thu Jul 29, 2021 4:55 am
by ADD Creative
HenrysCat wrote:
Thu Jul 29, 2021 1:31 am
Thanks, I found the setting under System > Settings > Server > Error Handling, but three places?
In the settings.
In system/config/default.php. https://github.com/opencart/opencart/bl ... lt.php#L53
In you PHP configuration. Should be off by default, but there are some bad server configurations out there. Use phpinfo() to check.