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

Susanne Moog typo3 at susannemoog.de
Wed Nov 17 10:06:41 CET 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.

committed Jeffs v3 to trunk after my +1 by reading and testing.
I changed functionname and fieldname to camelCase and added a task in
the TSref tracker to change the data types in the documentation
(http://forge.typo3.org/issues/10885)

@Jeff, regarding class constants: I'd introduce them when we need the
values a second time. No need to introduce them before we know if we'll
ever need them.

Cheers,

Susanne


-- 
What's worth the price is always worth the fight
Every second counts 'cause there's no second try

TYPO3 Core Team Member


More information about the TYPO3-team-core mailing list