-
Improvement
-
Resolution: Fixed
-
Minor
-
4.3
-
MOODLE_403_STABLE
-
MOODLE_403_STABLE
-
- Covered by automated tests (PHPUnit)
If a report calls $this->add_base_condition_sql($select); where $select is an empty string (due to some pre-processing), and the report already has another base condition set then we get invalid SQL generated:
WHERE bp.module = :rbparam0 AND # literally the end of the clause, because of empty string |
There exists a fairly easy workaround: account for empty $select string, and replace with "1=1" but that's not nice to remember/do - improve the API to do the right thing in these cases
Discovered while working on tenancy segregation in WP-4110