Posted - 10/23/2026 : 08:37:22
Hi Vince,
Many thanks for the reply.
Added the @ before the get_magic_quotes_gpc (as below) but it threw the same error message when doing another test card transaction:
******************************************
if (@get_magic_quotes_gpc()) { $_POST = array_map('stripslashes', $_POST); }
******************************************
Did a quick Google search which suggested that if running PHP 8.0 or newer, the get_magic_quotes_gpc() function has been completely removed from the PHP language and that placing an @ symbol in front of a function that does not exist will still result in a fatal "Uncaught Error: Call to undefined function get_magic_quotes_gpc()" and crash the script.
It then suggested that to stop the code being called on the more modern PHP versions (and prevent the crashes on PHP 8+) to either completely delete the lines of code or to check if the function exists first using the function_exists() statement.... I opted for trying the function_exists statement:
******************************************
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $_POST = array_map('stripslashes', $_POST); }
******************************************
Did another test card payment and the transaction went through correctly with the transaction status on the ECT dashboard being updated to "Authorized" with the relevant Transaction Auth Code and the order confirmation and email Receipt with the order details being sent correctly.
Just wanted to double check that you don't see any obvious issues or additional problems being created down the line with using the function_exists() statement in the customppreturn.php file ?
Thanks again.
Neil

|