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

JoH asenau info at cybercraft.de
Fri Oct 22 23:54:51 CEST 2010


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

Cheers

Joey

--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tslib_content_v2.diff
Type: application/octet-stream
Size: 11899 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101022/ec0ae80a/attachment-0001.obj>


More information about the TYPO3-team-core mailing list