WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Gallery] bug here?

[Resolved] [Plugin: Gallery] bug here?

  • Peidong Hu
    Member

    @zhouyibhic

    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bestwebsoft
    Participant

    @bestwebsoft

    Hello,

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

    Regards,
    Oksana

    Peidong Hu
    Member

    @zhouyibhic

    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.

    Plugin Author bestwebsoft
    Participant

    @bestwebsoft

    Please remove word ‘$post’ from string below:

    global $post, $wpdb

    And we will remove it from the plugin.

    Best regards,
    Oksana

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Gallery] bug here?’ is closed to new replies.