Hi I have been trying to update a legacy plugin ( tutorship ) so that it will work again in Moodle 3.5
To bring it back to life I need o update the code so it is php 7 compatible. Being a novice programmer I am battling through and have come across this latest error being shown with debugging on in Moodle 3.5 :
Exception - Argument 3 passed to moodle_database::get_field() must be of the type array, string given, called in
The relevant code seems to be :
$studentid = $USER->id; //$DB->get_field('tutorship_reserves', 'studentid', $reservationconditions);
$reserveid = $DB->get_field('tutorship_reserves', 'timetableid', $timetableid2);
I can see in the Moodle tracker this kind of error has been experienced before: https://tracker.moodle.org/browse/MDL-15004
I am really not sure how to deal with this problem. Can someone suggest a way to fix it ?
BR
Dan