| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | +defined('ABSPATH') || die('Restricted Access'); | |
| 2 | 3 | |
| 3 | 4 | use AcyMailing\Core\AcymPlugin; |
| 4 | 5 | use AcyMailing\Classes\FieldClass; |
| 5 | 6 | |
| @@ -21,8 +22,9 @@ | ||
| 21 | 22 | |
| 22 | 23 | $fieldClass = new FieldClass(); |
| 23 | 24 | $birthdayField = $fieldClass->getOneById((int)$options['field']); |
| 24 | 25 | if (empty($birthdayField)) { |
| 26 | + // Prevent the campaign from being sent to everyone | |
| 25 | 27 | $query->where[] = '0 = 1'; |
| 26 | 28 | |
| 27 | 29 | return; |
| 28 | 30 | } |