cliffparnitzky/FormDependentMandatoryField

Compatibility Issues with php 7.3?

Closed this issue · 2 comments

wlma commented

Hi,
not sure if this is really a issue but I ran into problems with php 7.3 in combination with contao-mpforms from terminal42:

Fatal error: Uncaught exception TypeError with message Argument 1 passed to FormDependentMandatoryField::loadDependentMandatoryField() must be an instance of FormFieldErrorMsg\Widget, instance of FormMPFormPageSwitch given, called in /usr/local/apache2/htdocs/system/modules/mp_forms/MPFormsFormManager.php on line 416 thrown in system/modules/zFormDependentMandatoryField/forms/FormDependentMandatoryField.php on line 53

after changing the Typehint in Class "FormDependentMandatroyField" from "Widget" to "Contao\Widget" in Line 53 and 64 it worked again

Edit: Missed that: Running on Contao 3.5.40 (way too old, i know)

I think this is an valid issue: more a probleme with inheritance or something else ... not PHP 7.3

This has to be changed.