Jump to content

Topic on Project:Support desk

Password reset MWExceptionHandler.php error

2
Summary by Ciencia Al Poder

The error Fatal error: Uncaught TypeError... happens when you use PHP 7 with old and unsupported MediaWiki versions. Already handled in Topic:U628dyvtxwlqlsso

Bekircem (talkcontribs)

I've installed Pear Mail package. After that, when i request for password reset it gives me that error:

Fatal error: Uncaught TypeError: Argument 1 passed to MWExceptionHandler::handleException() must be an instance of Exception, instance of Error given in includes/exception/MWExceptionHandler.php:153 Stack trace: #0 [internal function]: MWExceptionHandler::handleException(Object(Error)) #1 {main} thrown in includes/exception/MWExceptionHandler.php on line 153

My localsettings.php file:

$wgEnableEmail = True;
$wgEnableUserEmail = True; # UPO
$wgEmailAuthentication = True;

$wgSMTP = array(
    'host'     => "smtp.sparkpostmail.com",
    'IDHost'   => "sitename.com",
    'port'     => 587,
    'auth'     => true,
    'username' => "SMTP_Injection",
    'password' => "KEY"
);

How i fix that problem?

Osnard (talkcontribs)

This sounds like a problem with the installed PHP version. Which version MediaWiki and which version of PHP do you have installed?

To get a more speaking error message you could remove the type hint "Exception" in includes/exception/MWExceptionHandler.php on line 153