Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Array to string conversion" #201

Open
dogawaf opened this issue Oct 21, 2022 · 0 comments
Open

Error "Array to string conversion" #201

dogawaf opened this issue Oct 21, 2022 · 0 comments

Comments

@dogawaf
Copy link
Contributor

dogawaf commented Oct 21, 2022

On a php8 system, a backend preview template triggers an error "Array to string conversion"

This is triggered with this kind of setup:

tt_content with an inline field table_A, foreign_table=table_A
table A has a selectField with foreign_table=table_B, maxItems=1

The generated fluid preview:

<f:for each="{processedRow.table_A}" as="item">
    <ul>
        <li>
            <f:translate key="LLL:EXT:site_content_elements/Resources/Private/Language/locallang_db.xlf:table_A.table_B" /> {item.table_B} (id={item.uid})<br/>
        </li>
    </ul>
</f:for>

Here, {item.table_B} is an array, which leads to an error.
Before php 8, fluid displayed Array.

\IchHabRecht\MaskExport\CodeGenerator\BackendFluidCodeGenerator::getInlineFluid should be fixed, I tried to recall getSelectFluid() from there, but it was not convincing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant