• Resolved kilzac

    (@kilzac)


    Hi,

    I’m currently preparing my WordPress website for PHP 7.3, and the PHP Compatibility Checker plugin has detected the following warning in your plugin file :

    FILE: shiftnav-responsive-mobile-menu/admin/settings-api.class.php
    LINE 121 | WARNING | Function create_function() is deprecated since PHP 7.2; Use an anonymous function instead

    Will this be fixed in the next version?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author sevenspark

    (@sevenspark)

    Yes, that is planned in the next update – thanks!

    If you need an immediate fix, you can replace admin/settings-api.class.php line 121

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

    with

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

    ??

    Thread Starter kilzac

    (@kilzac)

    great, thanks @sevenspark

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Deprecated function’ is closed to new replies.