get_records_*_assoc giving incorrect false when records exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon |
Bug Description
If you try to do a get_records_*_assoc but only want 1 field returned you get 'false' instead.
This is because the get_records_*_assoc functions need at least 2 fields to be selected to work correctly but doesn't give a warning if you only provide one
For example
$test = get_records_
$test2 = get_records_
The $test will return false but the $test2 will return an array with the users starting with 'adm'
So I'll add a SQL exception to avoid this trap in the future
I'll mark the bug 'high' in case we are relying in this anywhere in Mahara currently
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/7828