[TYPO3-mvc] Warning: Unknown class passed as parameter and cache problem

Xavier Perseguers typo3 at perseguers.ch
Sun Sep 13 11:04:17 CEST 2009


Hi,

Xavier Perseguers wrote:
> Hi,
> 
> I have this method signature:
> 
> /**
>  * Returns a list of persons corresponding to search criteria.
>  *
>  * @param string $lastName
>  * @param string $firstName
>  * @return string The rendered view
>  */
> public function searchAction($lastName, $firstName) {
> 
> }

I tried to create a domain object holding lastname and firstname and changed the signature to

public function searchAction(Tx_MySearch_Domain_Model_Criteria $criteria)

but now I get

Catchable fatal error: Argument 1 passed to Tx_MySearch_Controller_PersonController::searchAction() must be an instance of Tx_MySearch_Domain_Model_Criteria, array given in ...

My POST parameters seem valid though:

tx_mysearch_person[__referer][actionName]	search
tx_mysearch_person[__referer][controllerName]	Person
tx_mysearch_person[__referer][extensionName]	MySearch
tx_mysearch_person[criteria][firstName]	
tx_mysearch_person[criteria][lastName]	perseguers

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-project-typo3v4mvc mailing list