[TYPO3-mvc] type-Exception bei eigener findAll-Methode

Dennis Ahrens dennis.ahrens at googlemail.com
Thu Sep 29 12:31:57 CEST 2011


Hi Christian,

for further communication: the language of this list is english.

> Nun  habe ich nachgeforscht, welcher Code-Teil dieses Type-Problem auslöst und bin darauf gestoßen, dass:
> $result = $this->createQuery()->execute();
>
> aus der Original-Methode keine Probleme bereitet, sobald ich diese Kurzform aber in 2 Teile teile:
>                  $result = $this->createQuery();
> $result->execute();

in case one you assign the return value of execute() to the variable 
$result. $result is an array in this case (if you use an older version 
of extbase)

in case two you just call the method on $result and do *not* assign the 
return value into the variable. $result is an object of type 
Tx_Extbase_Persistence_Query in this case.

$result = $result->execute(); or return $result->execute(); will help 
you out.

regards
Dennis


More information about the TYPO3-project-typo3v4mvc mailing list