WordPress.org

Ready to get started?Download WordPress

Forums

Gallery
[resolved] bug here? (4 posts)

  1. Peidong Hu
    Member
    Posted 2 years ago #

    if ( ! function_exists ( 'gllr_save_postdata' ) ) {
    function gllr_save_postdata( $post_id, $post ) {
    global $post, $wpdb;

    =============================================
    Hi above code seems buggy because the function input param already has a $post variable here, but in the following statement, it declares another 'global $post' which will override the input param $post.

    xmlrpc call will get error here since the global $post is uninitialized in the xmlrpc call context.

    zhouyi

    http://wordpress.org/extend/plugins/gallery-plugin/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 2 years ago #

    Hello,

    Both of these variables have the same value.
    Could you please describe this bug?

    Regards,
    Oksana

  3. Peidong Hu
    Member
    Posted 2 years ago #

    the scenario of the bug is happened when I invoke xmlrpc call remotely to edit a custom type post (gallery type). global $post is empty when code executes here. it will replace the function parameter $post.

    zhouyi.

  4. bestwebsoft
    Member
    Plugin Author

    Posted 2 years ago #

    Please remove word '$post' from string below:

    global $post, $wpdb

    And we will remove it from the plugin.

    Best regards,
    Oksana

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.