0

The form has recently stopped sending.

Deprecated: Function create_function() is deprecated in /home/customer/www/franktribute.com/public_html/RequestForm/testform4_files/formoid1/handler.php on line 239

Code section is:

function frmd_handler(){

ob_start();
register_shutdown_function(create_function('', '
    echo str_replace(
        "{{Formoid}}",
        frmd_end_form(),
        @ob_get_clean()
    );
'));

Line 239 is register_shutdown_function(create_function('', '

Any thought on how to correct this. No a big php person here so it's tricky.

Thanks

I ready a ton of threads online. Could not find anything specific. With my limited php skills I tried to tweak the code but, just created fatal errors.

Steve
  • 1

1 Answers1

0

The below code removes the deprecated create_function function, and should work for you, as this new code uses an anonymous function instead:

https://www.php.net/manual/en/functions.anonymous.php

ob_start();
register_shutdown_function(function () {
echo str_replace("{{Formoid}}", frmd_end_form(), @ob_get_clean());
});