Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0.2
-
Component/s: Database SQL/XMLDB
-
Labels:
-
Difficulty:Moderate
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
with the changes in 2.0 the following code won't work correctly as recordset calls will always return some data and aren't empty.
here are just a couple of recordset_sql calls I've found but there are a lot more that need fixing.
this one looks really bad in lib/dml/moodle_database.php:
if ($mrs = $this->get_recordset_sql($sql, $params, 0, 1))
admin/multilangupgrade.php:
if ($rs = $DB->get_recordset_sql($sql)) {
course/user.php:
if (!$rs = $DB->get_recordset_sql($sql)) {
enrol/authorize/localfuncs.php:
if (!$rs = $DB->get_recordset_sql($sql)) {
group/overview.php:
if ($rs = $DB->get_recordset_sql($sql, $params)) {
lots like this in lib/accesslib.php:
if ($rs = $DB->get_recordset_sql($sql, $params)) {
Attachments
Issue Links
- has been marked as being related by
-
MDL-25707 There is no easy way to work out how many results are returned from a get_recordset()
-
- Closed
-