[TYPO3-mvc] Beginner question - Argument passed to controller must be an instance
Lorenz Ulrich
lorenz-typo3 at visol.ch
Mon Feb 7 11:14:53 CET 2011
Hi there
I hope you're open for stupid beginner questions, too.
I've got an Extbase/Fluid extension here that works fine in TYPO3 4.3
but doesn't work anymore in 4.5.
I have a method that is called from my AddressController.php:
private function
sendActivationEmail(Tx_Vsubscription_Domain_Model_Address $address) {
}
This method expects an address object. In Fluid for 4.3 this was
obviously instanced automatically. Now I've got this error:
Argument 1 passed to
Tx_Vsubscription_Controller_AddressController::sendActivationEmail()
must be an instance of Tx_Vsubscription_Domain_Model_Address, null given
So as a cosequence I thought I could make an instance in the
initializeAction:
public function initializeAction() {
$this->addressRepository =
t3lib_div::makeInstance('Tx_Vsubscription_Domain_Repository_AddressRepository');
$this->address =
t3lib_div::makeInstance('Tx_Vsubscription_Domain_Model_Address');
}
But I still got the same error. Can anybody help with my problem?
Thanks,
Lorenz
More information about the TYPO3-project-typo3v4mvc
mailing list