[TYPO3-core] RFC #16096 Bug: addToAllTCATypes after certain fields does not work anymore
Thomas Maroschik
tmaroschik at dfau.de
Mon Jan 3 14:50:46 CET 2011
I think there is a glitch in this method anyways.
every preg_match function call gets checked if it returns false. This is
mostly done by loose comparison != FALSE. That means, that if preg_match
returns 0(No Matches) or FALSE(Error in Expression) the contition is true.
The comparison is inconsistent in this method. Sometimes the result of
preg_match gets compared against 0 OR FALSE and sometimes solely against
FALSE. As above mentioned preg_match should never return FALSE when the
expression is built correctly. The only way I see, how the expression
could be built corrupt is when the TCA is misconfigured.
So my advice would be to either replace all strict comparisons (!==) to
loose comparisons (!=) or replace all comparisons with something like >= 1.
Thanks in advance.
Tom
More information about the TYPO3-team-core
mailing list