Wordpress 4.9.1 Bug of CUSTOM_TAGS throws Warning
The Wordpress 4.9.1. has just been released. I have tried to enable the customize tag e.g. script in my post, and it throws the following warning:
Warning: in_array() expects parameter 2 to be array, null given in wp-includes/kses.php on line 1416
Screenshot:
The steps to reproduce:
- add
define('CUSTOM_TAGS', true);inwp_config.phpunder your wordpress root directory. - add the following to
functions.phptemplate
function add_scriptfilter( $string ) {
global $allowedtags;
$allowedtags['script'] = array( 'src' => array () );
return $string;
}
add_filter( 'pre_kses', 'add_scriptfilter' );
and then the warning will be thrown on all pages/posts.
Posted on Utopian.io - Rewarding Open Source Contributors

Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thank you!
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x