• Resolved muscleman

    (@xxman2021)


    hi every body
    my web site debug send me this error:

    Deprecated: Function create_function() is deprecated in /home/*****/public_html/wp-config.php on line 79

    line code in config.php :
    add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));

    any body can send me fixed code ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @xxman2021,

    You can try

    function change_filesystem_method($method) {
      return 'direct';
    }
    add_filter('filesystem_method', 'change_filesystem_method');
    
    Thread Starter muscleman

    (@xxman2021)

    hi
    nt working …with ur code web site down

    • This reply was modified 3 years, 1 month ago by muscleman.
    Thread Starter muscleman

    (@xxman2021)

    that error is from update PHP core host …ver5 to 7

    The function should be defined as follows :
    error code:
    create_function(‘$a’, ‘return “direct”;’ )

    create_function became change must use function()

    any body can change this line code :

    add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));

    Thread Starter muscleman

    (@xxman2021)

    Cereno Deng (@hiyottaunits)
    i check ur solutions again
    tanx my problem solved by your solutions

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