Title: PHP Warning: compact(): Undefined variable $cc and $bcc
Last modified: November 23, 2024

---

# PHP Warning: compact(): Undefined variable $cc and $bcc

 *  Resolved [coppertom](https://wordpress.org/support/users/coppertom/)
 * (@coppertom)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/php-warning-compact-undefined-variable-cc-and-bcc/)
 * This is filling our error logs lately:
 * `PHP Warning: compact(): Undefined variable $cc
   PHP Warning: compact(): Undefined
   variable $bccin wp-mail-api.php line 569
 * Line 569 is a compact() call, but it seems $cc and $bcc are only declared if 
   $headers is not empty for some reason.

The topic ‘PHP Warning: compact(): Undefined variable $cc and $bcc’ is closed to
new replies.

 * ![](https://ps.w.org/mailgun/assets/icon-256x256.png?rev=2434524)
 * [Mailgun for WordPress](https://wordpress.org/plugins/mailgun/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailgun/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailgun/)
 * [Active Topics](https://wordpress.org/support/plugin/mailgun/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailgun/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailgun/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [coppertom](https://wordpress.org/support/users/coppertom/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/php-warning-compact-undefined-variable-cc-and-bcc/)
 * Status: resolved