Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -466,8 +466,10 @@ |
467 | 467 | $users[0] = $watcher; // We don't have any anons, so using 0 is safe |
468 | 468 | } |
469 | 469 | |
470 | | - foreach ( $users as $user ) { |
471 | | - if ( $user->canReceiveEmail() ) { |
| 470 | + foreach ( $users as $id => $user ) { |
| 471 | + // canReceiveEmail() returns false for the fake watcher user, so exempt it |
| 472 | + // This is ugly |
| 473 | + if ( $id == 0 || $user->canReceiveEmail() ) { |
472 | 474 | // Send message in receiver's language |
473 | 475 | $lang = array( 'language' => $user->getOption( 'language' ) ); |
474 | 476 | |