• Hello,

    I have noticed this message above my header on my home page “Deprecated: Function create_function() is deprecated in /home/customer/www/befreewithlee.com/public_html/index.php on line 3”

    What does it mean and how do I get rid of it?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    In PHP 7.2.0, the “create_function()” is deprecated. So you should use Anonymous Function instead.

    For example instead of something like this:

    $callback = create_function('', 'echo "'.str_replace('"', '\"', $section['text']).'";');

    You should create function like this:

    $callback = function() {
        echo str_replace('"', '\"', $section['text']);
    };

    * Update all plugins & active theme with latest version release.

    Thanks!

    Thread Starter leeannmckenzie12

    (@leeannmckenzie12)

    Hey!

    Thanks so much for your reply.

    I have no idea how to change that? (I am not very good with the technical side of wordpress).

    How do I add what you have mentioned to my site?

    Lee-Ann

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Hmmm…. the wordpress “root” index.php file doesn’t create an functions. What’s in the file /home/customer/www/befreewithlee.com/public_html/index.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deprecated: Function create_function() is deprecated’ is closed to new replies.