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

PHP Fehler im Frontend und Backend #61

Open
valentin- opened this issue Mar 12, 2014 · 4 comments
Open

PHP Fehler im Frontend und Backend #61

valentin- opened this issue Mar 12, 2014 · 4 comments

Comments

@valentin-
Copy link

Hallo,

bei mir tritt auf einer Seite im Frontend (Element als Inhaltselement) und im Backend (im Artikel) folgender Fehler auf:

Warning…/system/functions.php434
#0 [internal function]: __error(2, 'explode() expec...', '…/s...', 434, Array)
#1 …/system/functions.php(434): explode(',', Array)
#2 …/system/modules/dma_elementgenerator/DMAElementGenerator.php(330): trimsplit(',', Array)
#3 …/system/modules/dma_elementgenerator/DMAElementGenerator.php(48): DMAElementGenerator->compile(Object(DMAElementGeneratorContent))
#4 …/system/modules/dma_elementgenerator/DMAElementGeneratorContent.php(47): DMAElementGenerator->generate(Object(DMAElementGeneratorContent))
#5 …/system/modules/frontend/ContentElement.php(139): DMAElementGeneratorContent->compile()
#6 …/system/libraries/Controller.php(511): ContentElement->generate()
#7 …/system/modules/frontend/ModuleArticle.php(194): Controller->getContentElement('124')
#8 …/system/modules/frontend/Module.php(140): ModuleArticle->compile()
#9 …/system/modules/frontend/ModuleArticle.php(71): Module->generate()
#10 …/system/libraries/Controller.php(443): ModuleArticle->generate(true)
#11 …/system/libraries/Controller.php(1750): Controller->getArticle('5', false, true)
#12 …/system/modules/frontend/FrontendTemplate.php(193): Controller->replaceInsertTags('...')
#13 …/system/modules/frontend/PageRegular.php(171): FrontendTemplate->output()
#14 …/index.php(266): PageRegular->generate(Object(DB_Mysql_Result))
#15 …/index.php(401): Index->run()
#16 {main}

Gibt es dazu schon was bekanntes? Sonst werde ich es die Tage mal debuggen.

@JanoschSkuplik
Copy link
Contributor

Nee, bekannt ist dazu noch nichts.
Auch ich würde es mir gerne einmal ansehen, kann es mit der aktuellen Contao-Version aber nicht nachstellen. Daher ein paar Fragen:
Welche Contao-Version?
Wurde Contao upgedatet?

@valentin-
Copy link
Author

Es ist Contao 2.11.16 und die aktuelle GitHub Version.

Ich denke es liegt daran, dass der 2. Parameter in system/functions.php Zeile 434 ein Array ist und kein String.

$arrFragments = array_map('trim', explode($strPattern, $strString));

Bei Checkboxes und Radios (Mehrfachauswahl) steht in $arrData[$objField->title] kein String sondern ein Array (in DMAElementGenerator.php, Zeile 280,330), z.B.:

Array
(
    [0] => 37
    [1] => 38
    [2] => 39
    [3] => 40
    [4] => 41
    [5] => 42
    [6] => 43
)

oder

Array
(
    [0] => tl_files/content/bild1.png
    [1] => tl_files/content/bild2.png
)

@JanoschSkuplik
Copy link
Contributor

Jawoll, die aktuelle github-Version ist für Contao 3.2. Für 2.11 existiert ein weiterer Branch.

@valentin-
Copy link
Author

Ok, habe nun die Version für 2.11 installiert, aber der Fehler besteht noch immer.

Noch eine kurze Zusatzinfo: Es wird alles korrekt ausgegeben, lediglich die Fehlermeldung erscheint wenn displayErrors aktiviert ist.

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

No branches or pull requests

2 participants