Wordpress 4.9.1 Bug of CUSTOM_TAGS throws Warning by justyy

View this thread on steempeak.com
· @justyy ·
$23.14
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:

![wordpress-bug.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512076729/gcvsltd96iqef9xk8vca.jpg)

# The steps to reproduce:
1. add `define('CUSTOM_TAGS', true);` in `wp_config.php` under your wordpress root directory.
2. add the following to `functions.php` template 

```
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.



<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@justyy/wordpress-4-9-1-bug-of-customtags-throws-warning">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
post_id19,152,948
authorjustyy
permlinkwordpress-4-9-1-bug-of-customtags-throws-warning
categoryutopian-io
json_metadata"{"type": "bug-hunting", "repository": {"id": 2889328, "watchers": 10166, "events_url": "https://api.github.com/repos/WordPress/WordPress/events", "forks": 5862, "name": "WordPress", "issues_url": "https://api.github.com/repos/WordPress/WordPress/issues{/number}", "trees_url": "https://api.github.com/repos/WordPress/WordPress/git/trees{/sha}", "fork": false, "git_url": "git://github.com/WordPress/WordPress.git", "assignees_url": "https://api.github.com/repos/WordPress/WordPress/assignees{/user}", "size": 179321, "owner": {"id": 276006, "following_url": "https://api.github.com/users/WordPress/following{/other_user}", "starred_url": "https://api.github.com/users/WordPress/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WordPress/subscriptions", "repos_url": "https://api.github.com/users/WordPress/repos", "login": "WordPress", "gists_url": "https://api.github.com/users/WordPress/gists{/gist_id}", "followers_url": "https://api.github.com/users/WordPress/followers", "received_events_url": "https://api.github.com/users/WordPress/received_events", "type": "Organization", "avatar_url": "https://avatars0.githubusercontent.com/u/276006?v=4", "site_admin": false, "organizations_url": "https://api.github.com/users/WordPress/orgs", "gravatar_id": "", "events_url": "https://api.github.com/users/WordPress/events{/privacy}", "url": "https://api.github.com/users/WordPress", "html_url": "https://github.com/WordPress"}, "forks_count": 5862, "git_refs_url": "https://api.github.com/repos/WordPress/WordPress/git/refs{/sha}", "blobs_url": "https://api.github.com/repos/WordPress/WordPress/git/blobs{/sha}", "pushed_at": "2017-11-30T16:24:11Z", "watchers_count": 10166, "teams_url": "https://api.github.com/repos/WordPress/WordPress/teams", "comments_url": "https://api.github.com/repos/WordPress/WordPress/comments{/number}", "archived": false, "svn_url": "https://github.com/WordPress/WordPress", "merges_url": "https://api.github.com/repos/WordPress/WordPress/merges", "subscribers_url": "https://api.github.com/repos/WordPress/WordPress/subscribers", "issue_events_url": "https://api.github.com/repos/WordPress/WordPress/issues/events{/number}", "stargazers_url": "https://api.github.com/repos/WordPress/WordPress/stargazers", "mirror_url": null, "statuses_url": "https://api.github.com/repos/WordPress/WordPress/statuses/{sha}", "has_projects": true, "milestones_url": "https://api.github.com/repos/WordPress/WordPress/milestones{/number}", "description": "WordPress, Git-ified. Synced via SVN every 15 minutes, including branches and tags! This repository is just a mirror of the WordPress subversion repository. Please do not send pull requests. Submit patches to https://core.trac.wordpress.org/ instead.", "keys_url": "https://api.github.com/repos/WordPress/WordPress/keys{/key_id}", "open_issues": 5, "compare_url": "https://api.github.com/repos/WordPress/WordPress/compare/{base}...{head}", "ssh_url": "git@github.com:WordPress/WordPress.git", "license": {"name": "Other", "key": "other", "url": null, "spdx_id": null}, "html_url": "https://github.com/WordPress/WordPress", "commits_url": "https://api.github.com/repos/WordPress/WordPress/commits{/sha}", "open_issues_count": 5, "stargazers_count": 10166, "branches_url": "https://api.github.com/repos/WordPress/WordPress/branches{/branch}", "full_name": "WordPress/WordPress", "forks_url": "https://api.github.com/repos/WordPress/WordPress/forks", "score": 106.589325, "deployments_url": "https://api.github.com/repos/WordPress/WordPress/deployments", "contributors_url": "https://api.github.com/repos/WordPress/WordPress/contributors", "homepage": "https://wordpress.org/", "contents_url": "https://api.github.com/repos/WordPress/WordPress/contents/{+path}", "has_downloads": true, "collaborators_url": "https://api.github.com/repos/WordPress/WordPress/collaborators{/collaborator}", "created_at": "2011-12-01T07:05:17Z", "git_commits_url": "https://api.github.com/repos/WordPress/WordPress/git/commits{/sha}", "releases_url": "https://api.github.com/repos/WordPress/WordPress/releases{/id}", "private": false, "pulls_url": "https://api.github.com/repos/WordPress/WordPress/pulls{/number}", "git_tags_url": "https://api.github.com/repos/WordPress/WordPress/git/tags{/sha}", "notifications_url": "https://api.github.com/repos/WordPress/WordPress/notifications{?since,all,participating}", "language": "PHP", "updated_at": "2017-11-30T20:40:44Z", "has_wiki": false, "downloads_url": "https://api.github.com/repos/WordPress/WordPress/downloads", "hooks_url": "https://api.github.com/repos/WordPress/WordPress/hooks", "languages_url": "https://api.github.com/repos/WordPress/WordPress/languages", "default_branch": "master", "labels_url": "https://api.github.com/repos/WordPress/WordPress/labels{/name}", "url": "https://api.github.com/repos/WordPress/WordPress", "has_pages": false, "tags_url": "https://api.github.com/repos/WordPress/WordPress/tags", "clone_url": "https://github.com/WordPress/WordPress.git", "archive_url": "https://api.github.com/repos/WordPress/WordPress/{archive_format}{/ref}", "has_issues": false, "issue_comment_url": "https://api.github.com/repos/WordPress/WordPress/issues/comments{/number}", "subscription_url": "https://api.github.com/repos/WordPress/WordPress/subscription"}, "pullRequests": [], "format": "markdown", "image": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512076729/gcvsltd96iqef9xk8vca.jpg"], "links": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512076729/gcvsltd96iqef9xk8vca.jpg"], "app": "utopian/1.0.0", "platform": "github", "tags": ["utopian-io", "wordpress", "kses", "warning"], "community": "utopian"}"
created2017-11-30 21:21:18
last_update2017-11-30 21:21:18
depth0
children3
net_rshares8,790,741,359,282
last_payout2017-12-07 21:21:18
cashout_time1969-12-31 23:59:59
total_payout_value17.068 SBD
curator_payout_value6.072 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length988
author_reputation2,057,469,156,047,835
root_title"Wordpress 4.9.1 Bug of CUSTOM_TAGS throws Warning"
beneficiaries
0.
accountfreedom
weight658
1.
accountknowledges
weight41
2.
accountmisterdelegation
weight546
3.
accountruah
weight59
4.
accounttransisto
weight70
5.
accountutopian-io
weight542
6.
accountwackou
weight52
7.
accountxeldal
weight27
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars0
author_curate_reward""
vote details (50)
@espoem ·
Thank you for the contribution. It has been approved.

You can contact us on [Discord](https://discord.gg/UCvqCsx).
**[[utopian-moderator]](https://utopian.io/moderators)**
properties (22)
post_id19,307,121
authorespoem
permlinkre-justyy-wordpress-4-9-1-bug-of-customtags-throws-warning-20171202t183747683z
categoryutopian-io
json_metadata"{"app": "busy/1.0.0", "community": "busy", "tags": ["utopian-io"]}"
created2017-12-02 18:37:48
last_update2017-12-02 18:37:48
depth1
children1
net_rshares0
last_payout2017-12-09 18:37:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length172
author_reputation59,186,440,518,630
root_title"Wordpress 4.9.1 Bug of CUSTOM_TAGS throws Warning"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@justyy ·
Thank you!
properties (22)
post_id19,307,549
authorjustyy
permlinkre-espoem-re-justyy-wordpress-4-9-1-bug-of-customtags-throws-warning-20171202t184436727z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2017-12-02 18:44:36
last_update2017-12-02 18:44:36
depth2
children0
net_rshares0
last_payout2017-12-09 18:44:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length10
author_reputation2,057,469,156,047,835
root_title"Wordpress 4.9.1 Bug of CUSTOM_TAGS throws Warning"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
### Hey @justyy I am @utopian-io. I have just upvoted you!
#### Achievements
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Contribute more often to get higher and higher rewards. I wish to see you often!
- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
#### Get Noticed!
- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**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**
properties (22)
post_id19,333,403
authorutopian-io
permlinkre-justyy-wordpress-4-9-1-bug-of-customtags-throws-warning-20171203t035606428z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2017-12-03 03:56:06
last_update2017-12-03 03:56:06
depth1
children0
net_rshares0
last_payout2017-12-10 03:56:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,426
author_reputation152,913,012,544,965
root_title"Wordpress 4.9.1 Bug of CUSTOM_TAGS throws Warning"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000