Support » Plugin: Capability Manager Enhanced » create_function deprecated in PHP 7.2

  • Resolved KTS915

    (@kts915)



    Line 33 of capsman-enhanced.php needs changing from this:

    
    	add_action('admin_notices', create_function('', 'echo \'<div id="message" class="error fade" style="color: black">' . $message . '</div>\';'));
    

    to this:

    
    	add_action( 'admin_notices', function() {
    		echo '<div id="message" class="error fade" style="color: black">' . $message . '</div>';
    	} );
    

    Thanks for the plugin!

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