Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

create_function deprecated in PHP v7.2

$
0
0

Replies: 0

Your “widgets_init” action uses the deprecated create_function() method, which causes warnings to be thrown in PHP >= 7.2.

Please change the code to use a PHP anonymous function, supported since PHP v5.3 and is compatible with the WordPress minimum requirement of PHP v5.6.

add_action('widgets_init', function() { register_widget("wpInsertAdWidget"); });

  • This topic was modified 1 hour, 32 minutes ago by Ryan Smith.

Viewing all articles
Browse latest Browse all 59525

Trending Articles