projects
/
moodle-mod_attendance.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f3420b
)
Check if userto is empty (extra comma in thirdpartyusers field)
author
Dan Marsden
<dan@danmarsden.com>
Tue, 3 Apr 2018 22:19:22 +0000
(10:19 +1200)
committer
Dan Marsden
<dan@danmarsden.com>
Tue, 3 Apr 2018 22:19:22 +0000
(10:19 +1200)
classes/task/notify.php
patch
|
blob
|
history
diff --git
a/classes/task/notify.php
b/classes/task/notify.php
index
5584307
..
11b7137
100644
(file)
--- a/
classes/task/notify.php
+++ b/
classes/task/notify.php
@@
-106,6
+106,10
@@
class notify extends \core\task\scheduled_task {
$record->percent = round($record->percent * 100)."%";
$context = \context_module::instance($record->cmid);
foreach ($sendto as $senduser) {
+ if (empty($senduser)) {
+ // Probably an extra comma in the thirdpartyusers field.
+ continue;
+ }
// Check user is allowed to receive warningemails.
if (has_capability('mod/attendance:warningemails', $context, $senduser)) {
if (empty($thirdpartynotifications[$senduser])) {