Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0
-
Component/s: Database SQL/XMLDB
-
Labels:None
-
Difficulty:Easy
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
If empty array is passed to the $DB->get_in_or_equal(), the SQL containing "blahblah IN ()" is executed at the server, leading to dml_read_exception thrown (ERROR: syntax error). Of course, this is the caller's responsibility to check the passed value. However, I guess we should throw the exception sooner without actually querying the database.
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
The trivial fix committed into CVS HEAD. I used the same exception as we already throw at sql_substr(). Approved by skodak. Eloy, please double-check and close.