WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 22 months ago

#25253 new defect (bug)

Fatal error: Cannot redeclare class phpmailerException

Reported by: hovida Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.6
Component: Mail Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by SergeyBiryukov)

All Plugins Disabled, all Themes disabled - Reinstalled - All the same error:

http://www.tinnitus-coach.eu/wp-login.php?action=lostpassword

Fatal error: Cannot redeclare class phpmailerException in /homepages/23/d471228603/htdocs/wp-includes/class-phpmailer.php on line 2825

Same Problem when i use wp_mail on Cron shedules, see:
http://wordpress.org/support/topic/wp-cronphp-wp_mail-not-working?replies=2#post-4626751

Change History (2)

comment:1 @SergeyBiryukov22 months ago

  • Component changed from Accessibility to Mail
  • Description modified (diff)
  • Summary changed from PHPMailer to Fatal error: Cannot redeclare class phpmailerException

comment:2 @SergeyBiryukov22 months ago

  • Keywords reporter-feedback added; needs-patch removed

Could not reproduce the issue neither with the password reset form nor with your plugin from the forum topic, it works fine for me.

The only place in core where class-phpmailer.php is included is wp_mail(), but it first checks if $phpmailer global is defined, and it uses require_once rather than just require: tags/3.6/wp-includes/pluggable.php#L223.

I can only reproduce this fatal error if I manually include class-phpmailer.php twice outside of wp_mail().

Last edited 22 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.