• Resolved thomaslhotta

    (@thomaslhotta)


    Hi

    There is a bug in myCRED_Query_Leaderboard.php in get_reference_db_query when multiple ref types or points types are defined.

    The issue is on line 436. If one or both $reference_values and $point_type_values are not strings, what happens if you set more than one ref or point type, prepare fails.

    I think this is a case of over-optimization. You generate different SQL if multiple refs or point types are defined. If you always generate IN statements regardless of the number of refs or point types you can avoid the error all together. I doubt there will be any impact on performance as MySQL is pretty good at optimizing such queries.

    I’d be happy to contribute a pull request, but the GitHub repo seems to be out of date.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @thomaslhotta ,

    Thanks for contacting us.

    We appreciate that you took the time to identify this issue. Please download the updated plugin from below and test it.

    Download Now

    Let me know if the issue still persist.

    Thanks & Regards,
    WP Experts Support Team.

    Hi there,

    Due to a lack of activity, we are going to mark this ticket as resolved. If you have any other issues, please feel free to open a new ticket.

    Have a great day!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug in myCRED_Query_Leaderboard’ is closed to new replies.