#29325optionsplit inconsistent handling of whitespaces an zeros
Description
optionsplit as implemented in splitConfArray($conf, $splitCount) in class.t3lib_tstemplate.php uses a simple explode by |*| and a subsequent if($main0) etc. for the determination of the main parts, leading to the following behaviour:
1|*| |*|2 => middle part present (space)
1|*|0|*|2 => middle part empty (if(0))
1|*| 0|*|2 => middle part present (if(’ 0’))
Whe splitting subparts an explode by || followed by a count and a trim during assignment leads to a more expectable but rather different behaviour:
1||0|*||*| => last subpart of first main part is not empty but the string ‘0’ will be assigned.
I attached a small patch that would change the checking of main parts to strlen(trim()), to achive a hopefully less confusing behaviour.
Do I overlook something?
thanks and kind regards, Tobias
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.