[TYPO3-core] RFC: #10359: Empty subparts are ignored
Jigal van Hemert
jigal at xs4all.nl
Sat Aug 15 16:42:10 CEST 2009
Hi Steffen,
Steffen Kamper wrote:
> i don't see a sense in returning this string.
> But a good addition would be to if there is no pair
> a) add syslog
> b) add message to admPanel with $GLOBALS['TT']->setTSlogMessage
>
> i would prefer b)
I don't see a sense in logging a message anywhere, because there is no
need for a warning or an error.
The problem is in getSubPart() returning an empty string when the
markers aren't found. It should return FALSE and then the code which
calls the function can distinguish between empty/zero content and
missing markers.
Returning FALSE doesn't really solve the problem because many pieces of
code only test on the boolean evaluation of the returned value.
Returning this string doesn't break any templating and it solves the
problem of the boolean evaluation.
I'm more than happy to change the function that it returns FALSE if the
marker(s) aren't found and patch the cases I've found in core +
automaketemplate. In this case fixing the problem in other extensions
has to be left to the authors of those extensions.
Regards,
--
Jigal van Hemert.
More information about the TYPO3-team-core
mailing list