Uncaught Error strcmp(): Argument #1 ($string1) must be of type string, bool given
Closed this issue · 2 comments
arminfrey commented
Bug description
Uncaught Error: strcmp(): Argument #1 ($string1) must be of type string, bool given {"exception":"[object] (TypeError(code: 0): strcmp(): Argument #1 ($string1) must be of type string, bool given at /var/.../.../.../.../.../vendor/pdir/contao-survey/src/Resources/contao/elements/ContentSurvey.php:948)
Steps to reproduce
Umfrage erstellen, im Frontend Umfrage aufrufen
Expected behavior
Fehler beheben in ContentSurvey.php
if (0 === strcmp($status, 'finished'))
neu if (0 === strcmp(strval($status), 'finished'))
Screenshots
Environment
Contao 4.13.32, contao_survey 3.5.0, PHP 8.1.25
MDevster commented
I have added the fix in dev-master. Version 3.6.0 will certainly be released soon.
arminfrey commented
Bug is fixed in dev-master. My tests were successful.