• when I call wp_update_post($post) with
    $post = Array
    (
    [ID] => 33
    [comment_status] => open
    [ping_status] => open
    [post_author] => 1
    [post_category] => Array
    (
    [0] => 409
    )

    [post_content] =>
    [post_name] => product name-product model
    [post_status] => pending
    [tags_input] => accessories, collaboration, desktop, editor, knowledgebase, mini, notebook, server, storage
    [post_title] => product name
    )

    if $post[ID] is set, in line 1518 of post.php, do_action(‘pre_post_update’, $post_ID) calls wp_update_post() again. The second time it gets called, it creates a new category with both name and slug set as ‘3’

    Path: post.php
    Name: post.php
    URL: http://core.svn.wordpress.org/trunk/wp-includes/post.php
    Repository Root: http://core.svn.wordpress.org
    Repository UUID: 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    Revision: 11985
    Node Kind: file
    Schedule: normal
    Last Changed Author: markjaquith
    Last Changed Rev: 11978
    Last Changed Date: 2009-09-27 01:33:56 -0400 (Sun, 27 Sep 2009)
    Text Last Updated: 2009-10-01 02:28:08 -0400 (Thu, 01 Oct 2009)
    Checksum: b4e2e0dc8070898af6fbd5e461e48573

  • The topic ‘Bug in post.php’ is closed to new replies.