[wp-trac] [WordPress Trac] #33825: PHP warning on wp_insert_post, when tax_input variable is string
WordPress Trac
noreply at wordpress.org
Fri Sep 11 08:39:49 UTC 2015
#33825: PHP warning on wp_insert_post, when tax_input variable is string
-------------------------------+-----------------------------
Reporter: ivan.jankovic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.3
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
On creating new post:
{{{
$new_post = array(
'post_title' => 'test',
'post_content' => '',
'post_status' => 'publish',
'post_type' => 'post',
'post_name' => 'test',
'tax_input' => 'test',
);
}}}
you'll get warning:
PHP Warning: Invalid argument supplied for foreach() in /xyz/wp-
includes/post.php on line 3471
Looks like tax_input argument expects an array, not string?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33825>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list