Project

General

Profile

Bug #69376

Updated by Björn Jacob about 9 years ago

The following code produces an PHP fatal error: 

 <pre> 
 10 = SELECT 
 10 { 
	 label = Select 

	 10 = OPTGROUP 
	 10 { 
		 label = Optgroup 

		 10 = OPTION 
		 10 { 
			 data = Option 1 
			 value = value 1 
		 } 

		 20 = OPTION 
		 20 { 
			 data = Option 2 
			 value = value 2 
		 } 
	 } 
 } 
 </pre> 

 The code mentioned above should be possible, see "documentation":https://docs.typo3.org/typo3cms/extensions/form/latest/Configuration/Reference/Objects/Index.html#reference-form-optgroup. 

 The following error occurs: 

 <pre> 
 #1: PHP Catchable Fatal Error: Argument 1 passed to 
 TYPO3\CMS\Form\Domain\Model\Element\SelectElement::addElement() 
 must be an instance of TYPO3\CMS\Form\Domain\Model\Element\OptionElement, 
 instance of TYPO3\CMS\Form\Domain\Model\Element\OptgroupElement given, called in 
 /typo3/cms/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php /kunden/43052_07745/projects/9994/typo3_7/vendor/typo3/cms/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php on line 165 
 and defined in 
 /typo3/cms/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php /kunden/43052_07745/projects/9994/typo3_7/vendor/typo3/cms/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php line 56 (More information) 
 </pre>

Back