Bug in myCRED_Query_Leaderboard
-
Hi
There is a bug in
myCRED_Query_Leaderboard.php
inget_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.
- The topic ‘Bug in myCRED_Query_Leaderboard’ is closed to new replies.