[buddypress-trac] [BuddyPress Trac] #8347: The way we check PHPMailer v6 is available can generate errors
buddypress-trac
noreply at wordpress.org
Sat Aug 15 19:22:39 UTC 2020
#8347: The way we check PHPMailer v6 is available can generate errors
--------------------------+---------------------
Reporter: imath | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 6.3.0
Component: Core | Version: 6.2.0
Severity: major | Resolution:
Keywords: has-patch |
--------------------------+---------------------
Comment (by imath):
Hi @dcavins
Here's how you can replicate the issue, add this code into a bp-custom.php
file:
{{{
function override_bp_phpmailer_object() {
if ( ! class_exists( 'PHPMailer\\PHPMailer\\PHPMailer' ) ) {
require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
}
$phpmailer = new PHPMailer\PHPMailer\PHPMailer( true );
return $phpmailer;
}
add_filter( 'bp_phpmailer_object', 'override_bp_phpmailer_object' );
}}}
Then create a private group with a user and with another user, go to the
group's landing page, and click on the Request membership Group's
navigation (not the header's button).
You should see a fatal ;)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8347#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list