#78148form.select ViewHelper only likes alphanumeric chars
Description
Hey guys,
I have stumbled upon a rather strange problem with the form.select ViewHelper in TYPO3 CMS 7.6.11 and PHP 5.6.19
I am using the ViewHelper on an array {sites} which looks like this:
0 => ArrayObject
label => 'Test Test123'
expanded => 'Test123, Test'
value => '73'
1 => ArrayObject
label => 'TestBla - TestTestTest'
expanded => 'TestTestTest, TestBla'
value => '43'
<f:form.select property="sites" options="{sites}" prependOptionValue="" prependOptionLabel="{f:translate(key: 'label.any')}" optionLabelField="label" optionValueField="value" sortByOptionLabel="1" multiple="1" size="5" />
The generated HTML looks like this:
<select size="5" multiple="multiple" name="tx_extension[query][sites][]">
<option value="">any</option>
<option value="73">Test Test123</option>
<option value="43">TestBla - TestTestTest</option>
</select>
The exact same thing runs on a second server, but this time with PHP 5.6.24.
I would have expected the same output but I get an Internal Server Error instead. The TYPO3 log is empty, the PHP error log is empty…
The only way I can get it to work is by stripping almost everything from the “label” leaving just the alphanumeric chars.
This array works on both versions of PHP:
0 => ArrayObject
label => 'TestTest123'
expanded => 'Test123, Test'
value => '73'
1 => ArrayObject
label => 'TestBlaTestTestTest'
expanded => 'TestTestTest, TestBla'
value => '43'
… as soon as the label includes a dot, a space or even a Sonderzeichen I get the Internal Server Error.
If you need any more information just ask.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.