-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
2.0.3, 2.1
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
Easy
Since Moodle 2.0, the $DB->delete_records() method always return true. If some problem is found, it throws exception.
So code like this:
if ($DB->delete_records($table, $params)) {
|
// Conditional code here
|
...
|
Has no sense at all. Review all the current uses and change them to be linear / add extra checks if needed.
Tip: grep -r "if" * | grep delete_records
Ciao