| @@ -175,9 +175,9 @@ | ||
| 175 | 175 | $to = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args ); |
| 176 | 176 | |
| 177 | 177 | $this->to = array_unique( (array) $to ); |
| 178 | 178 | |
| 179 | - if ( empty( $this->to ) ) { | |
| 179 | + if ( ! $this->to ) { | |
| 180 | 180 | return; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | $this->handle_phone_numbers(); |
| @@ -510,9 +510,9 @@ | ||
| 510 | 510 | * |
| 511 | 511 | * @return bool |
| 512 | 512 | */ |
| 513 | 513 | private function has_recipients() { |
| 514 | - return ! ( empty( $this->to ) && empty( $this->cc ) && empty( $this->bcc ) ); | |
| 514 | + return $this->to || $this->cc || $this->bcc; | |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | /** |
| 518 | 518 | * Send an email |
| @@ -585,13 +585,13 @@ | ||
| 585 | 585 | */ |
| 586 | 586 | private function package_header() { |
| 587 | 587 | $header = array(); |
| 588 | 588 | |
| 589 | - if ( ! empty( $this->cc ) ) { | |
| 589 | + if ( $this->cc ) { | |
| 590 | 590 | $header[] = 'CC: ' . implode( ',', $this->cc ); |
| 591 | 591 | } |
| 592 | 592 | |
| 593 | - if ( ! empty( $this->bcc ) ) { | |
| 593 | + if ( $this->bcc ) { | |
| 594 | 594 | $header[] = 'BCC: ' . implode( ',', $this->bcc ); |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | 597 | $header[] = 'From: ' . $this->from; |