Bug #7577
Error in Buying course plugin (version 1.9.10 and 1.10)
100%
Description
At line 312 in buy_course.lib.php
$sql = "SELECT 1 FROM %s WHERE %s ='" . Database::escape_string($parameter) . "' AND id_user='" . intval($user) . "';";
change for $sql = "SELECT 1 FROM %s WHERE %s ='" . Database::escape_string($parameter) . "' AND user_id='" . intval($user) . "';";
Associated revisions
Fix query in buy_course plugin - refs #7577
History
Updated by Yannick Warnier about 5 years ago
Actually it's a bit more complicated than that (id_user is for session_rel_user but course_rel_user calls it user_id), so I sent the following to 1.10.x:
https://github.com/chamilo/chamilo-lms/commit/7bf4da4b7a2311b901fd2941a28f01096d5ceb6d
and this to 1.9.x:
https://github.com/chamilo/chamilo-lms/commit/c7b17060a77ea57961bfc168690b4d0312c60d39
Updated by Yannick Warnier about 5 years ago
- Status changed from New to Needs testing
- Assignee set to Andre Boivin
- % Done changed from 0 to 100
The plugin was apparently broken in 1.9.x. Sorry for that. We did a lot of testing but apparently it wasn't enough for production.
Thanks for the report.
Updated by Yannick Warnier about 5 years ago
- Status changed from Needs testing to Bug resolved
- Assignee changed from Andre Boivin to Yannick Warnier
Fix query in buy_course plugin - refs #7577