[TYPO3-mvc] CollectionValidator.php in 6.2.x

Helmut Hummel helmut.hummel at typo3.org
Thu Aug 21 16:17:13 CEST 2014


On 21.08.14 08:49, Johannes C. Schulz - EnzephaloN IT-Solutions wrote:
> Hello
>
> I run into problems by extending tx_news with own model.
> All (LIST- & PREVIEW-view) works fine except DETAIL-view. DETAL-view throws
> an error about "Invalid argument supplied for foreach() in
> /PATH/typo3/sysext/extbase/Classes/Validation/Validator/CollectionValidator.
> php line 89". So I searched and searched, but found nothing.

What is the data type of $value at this point?

> I tried to add @ignorevalidation to my field - doesn't help.

This ignores validation errors but does not prevent the validator from 
being called.

>    /**
>     * @var string
>     * @ignorevalidation
>     * @lazy
>     */
>    protected $psoabilling;
>
>    /**
>     * @return array
>     */
>    public function getPsoabilling(){

You annotate string for the property but the getter returns an array?
How does the TCA of the field looks like?

And btw. instead of using a reposiory here, you should consider properly 
annotating the property and let Extbase fetch the related objects...

Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list