[TYPO3-core] RFC #16107: Bugfix - listNum = 0 not working anymore due to stdWrap changes

Susanne Moog typo3 at susannemoog.de
Sat Oct 23 17:49:10 CEST 2010


On 22.10.2010 23:54, JoH asenau wrote:
> This is an SVN patch request.
> 
> Type: Bugfix
> 
> http://bugs.typo3.org/view.php?id=16107
> 
> Branches: trunk
> 
> Original Problem:
> Since the stdWrap refactoring import.listNum = 0 does not work anymore and all other functions where = 0 is not meant to be false will fail, too. This is due to a wrong check in function stdWrap, line 4461.
> If changed from 
> if ($conf[$functionName] || $conf[$functionProperties]) {
> to
> if (isset($conf[$functionName]) || $conf[$functionProperties]) {
> it works again. I did not test possible other effects of that change at the moment.
> 
> This would have executed boolean stdWrap functions regardless of a possible value 0.
> So required = 0 would behave like required = 1.
> 
> Solution:
> The attached patch introduces function types as values of the $stdWrapOrder array instead of the current "1" and checks these types before the stdWrap function gets called.
> This makes sure that boolean functions will not be executed when their value is 0, while the rest of the functions will work as before.
> 
> Additionally it gives us more options to do a kind of "syntax check"
> 
> Will fix #16110 as well

Please don't do that. I just noticed this comment after committing 16110
... and I don't think both bugs should be fixed with one patch, 16110
hasn't necessarily anything to do with this one.

Question to this patch:
- $stdWrapDisabledFunctions =
'cObject,preUserFunc,stdWrap,preCObject,postCObject,prepend,append,postUserFunc,postUserFuncInt';
+ $stdWrapDisabledFunctions = 'cObject,functionname';

You don't disable the same functions as before, or do you? For example
prepend and append aren't of type "functionname" and they appeared
before, does this have a special reason?

Thx for fixing these things,

susanne


More information about the TYPO3-team-core mailing list