[TYPO3-core] RFC: #10359: Empty subparts are ignored

Steffen Ritter info at rs-websystems.de
Sat Aug 15 11:05:40 CEST 2009


Jigal van Hemert schrieb:
> This is an SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=10359
> 
> Branches: TYPO3_4-2, Trunk
> 
> Problem:
> t3lib_parsehtml::getSubPart() returns an empty string if the subpart 
> marker pair is not found, but it also returns an empty string if the 
> subpart marker pair is found but there is nothing between the subpart 
> markers (or the content is a zero ('0')).
> For code which calls getSubPart() there is no way to distinguish between 
> and empty, but existing subpart and a non-existing subpart.
> In many case the return value is evaluated as boolean:
> $html = t3lib_parsehtml::getSubPart($template, $marker);
> if ($html) {
> ...
> So anything between the subpart markers that evaluates to 'false' causes 
> the code to think that the subpart markers weren't found at all.
> 
> Solution:
> If the marker-pair is found any content which evaluates to 'false' will 
> be replaced with a dummy value (default: '<!-- -->').
> 
Hi,
well generally +1 by reading.
But I just did not get the point why this is needed...
<!-- test -->0<!-- test --> or <!-- test --><!-- test --> would not 
processed without, ok.
But where is the problem? Why should it be processes, or better what the 
advantage of processing it since there is nothing to do or what might 
happen.

regards

Steffen


More information about the TYPO3-team-core mailing list