Project: moodle
Issue MDL-43395: get_records*_sql silently converts invalid limit param to integer
The parameters for get_records are: {code} get_records($table, array $conditions=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {code} The parameters for get_records_sql are: {code} get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0); {code} Note that if you are a silly developer like Dan, you might accidentally pass a sort to {{$limitfrom}}. In that case, Moodle silently converts the string to an int without warning the developer. I propose to add a debugdeveloper warning for this.
Story points: 13