Opened 19 months ago
Last modified 19 months ago
#58109 reopened defect (bug)
Fatal Error when changed Taxonomy from hierarchical False to True
Reported by: | narenin | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.2 |
Component: | Taxonomy | Keywords: | |
Focuses: | administration, coding-standards | Cc: |
Description
When we changed hierarchical False to True for Taxonomy then we received Fatal Error.
taxonomy_meta_box_sanitize_cb_checkboxes [11:39 AM] Uncaught exception 'TypeError' with message 'array_map(): Argument #2 ($array) must be of type array, string given' in /var/www/wp-admin/includes/post.php:2091
This is happening because of taxonomy_meta_box_sanitize_cb_checkboxes function. This function not has the checked if the $term is array or not which is causing fatal error.
We can use is_array condition for this like already done in taxonomy_meta_box_sanitize_cb_input function.
Attachments (1)
Change History (6)
#2
@
19 months ago
- Resolution set to invalid
- Status changed from new to closed
Please find the steps below.
- Create a non-hierarchical custom taxonomy using register_taxonomy
- Now go to post and then assign some terms of that taxonomy to posts and then publish the post.
- Now change that non-hierarchical custom taxonomy to hierarchical custom taxonomy by using hierarchical=>true
- Now go to that post and try to save that post, you should get fatal error.
#4
@
19 months ago
@narenin I couldn't replicate the issue. Can you verify the issue still exists in the new blanks WP 6.2 without any plugins.
This ticket was mentioned in Slack in #core by oglekler. View the logs.
19 months ago
Note: See
TracTickets for help on using
tickets.
@narenin hello, could you tell us the steps to reproduce the issue?