Support » Plugin: Youtube Channel Gallery » create_function() is deprecated in PHP 7.2

  • Ulrich

    (@grapplerulrich)


    Hello

    I get the following PHP notice when running version 2.4 of the plugin.

    PHP Deprecated: Function create_function() is deprecated in /youtube-channel-gallery/youtube-channel-gallery.php on line 1223

    This can be fixed by using anonymous functions instead. Anonymous functions are supported as of PHP 5.3+.

    add_action( 'widgets_init', function() {
    	register_widget( 'YoutubeChannelGallery_Widget' );
    } );

    As WordPress has increased the minimum version 5.6 it is viable to increase the minimum version of the plugin too.

    Thanks!
    Ulrich

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.