menatwork-ia / registration_info_mailer

Contao Extension :: Mailer for registration and activation of frontend member
https://packagist.org/packages/menatwork/registration_info_mailer
1 stars 2 forks source link

Calling `setNewPassword` HOOK crashes #3

Closed cliffparnitzky closed 1 year ago

cliffparnitzky commented 7 years ago

When updating member data from backend with setting a new password and sending an activation email, the following error occues:

[18-Sep-2017 21:32:58 CET] PHP Fatal error: Uncaught exception 'ArgumentCountError' with message 'Too few arguments to function RegistrationInfoMailer\Handler::sendChangeMail(), 2 passed in .../system/modules/core/dca/tl_member.php on line 564 and exactly 3 expected' thrown in .../composer/vendor/menatwork/registration_info_mailer/system/modules/registration_info_mailer/src/Handler.php on line 92
#0 .../system/modules/core/dca/tl_member.php(564): RegistrationInfoMailer\Handler->sendChangeMail(Object(Contao\Database\Mysqli\Result), 'xyz...')
#1 .../system/modules/core/drivers/DC_Table.php(2972): tl_member->setNewPassword('xyz...', Object(Contao\DC_Table))
#2 .../system/modules/core/classes/DataContainer.php(353): Contao\DC_Table->save('xyz...')
#3 .../system/modules/core/drivers/DC_Table.php(1943): Contao\DataContainer->row('{personal_legen...')
#4 .../system/modules/core/classes/Backend.php(650): Contao\DC_Table->edit()
#5 .../system/modules/core/controllers/BackendMain.php(131): Contao\Backend->getBackendModule('member')
#6 .../contao/main.php(20): Contao\BackendMain->run()
#7 {main}

The setNewPassword HOOK is triggered, which has only 2 parameters (https://github.com/contao/core/blob/master/system/modules/core/dca/tl_member.php#L564) but 3 are given.

cliffparnitzky commented 5 years ago

Confirmed with Contao 3.5.28, Contao 4.4 and Contao 4.6

cliffparnitzky commented 5 years ago

Fixed with #6