WordPress.org

Forums

Gallery by BestWebSoft
[resolved] [Plugin: Gallery] bug here? (4 posts)

  1. Peidong Hu
    Member
    Posted 3 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 3 years ago #

    Hello,

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

    Regards,
    Oksana

  3. Peidong Hu
    Member
    Posted 3 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 3 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

  • Gallery by BestWebSoft
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.