bdaloukas / moodle-mod_game

moodle-mod_game
GNU General Public License v3.0
15 stars 40 forks source link

Error reading from database in Soduku game #22

Closed pingtaoye closed 10 months ago

pingtaoye commented 5 years ago

In the Soduku game, after I answered all the questions correctly and I tried to guess the number in the rest blank blocks, I got the following error:

Notice: Trying to get property of non-object in /var/www/data/ustbonifacedev/public_html/moodle/mod/game/sudoku/play.php on line 759

Notice: Trying to get property of non-object in /var/www/data/ustbonifacedev/public_html/moodle/mod/game/sudoku/play.php on line 177 Error reading from database

More information about this error

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SELECT id, col, score,questionid as id2 FROM mdl_game_queries WHERE attemptid = [array ( )] Error code: dmlreadexception ×Stack trace: line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown line 1245 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() line 1400 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() line 190 of /mod/game/sudoku/play.php: call to moodle_database->get_records_select() line 141 of /mod/game/sudoku/play.php: call to game_sudoku_compute_offsetquestions() line 762 of /mod/game/sudoku/play.php: call to game_sudoku_play() line 172 of /mod/game/attempt.php: call to game_sudoku_check_number() line 40 of /mod/game/attempt.php: call to game_do_attempt()

bdaloukas commented 5 years ago

Version 2019042403 fixes the above problem.