Bug #22594
closedClass prefix problem in getUserObj and callUserFunction (t3lib_div)
100%
Description
In the t3lib_div class, methods getUserObj and callUserFunction actually check that classes/functions have a valid prefix.
The prefix can be "tx_", for TYPO3 extensions, or a prefix defined in the installTool, for user classes/functions (default value is "user_").
Those two methods should IMHO also allow the "Tx_" prefix (with a T in uppercase), as it is the prefix used when developing extensions with "extbase".
Actually, here's the condition:
if ($checkPrefix &&
self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
self::isFirstPartOfStr(trim($funcRef),'tx_')
)
Should be something like:
if ($checkPrefix &&
self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
!(self::isFirstPartOfStr(trim($funcRef),'tx_') || self::isFirstPartOfStr(trim($funcRef),'Tx_'))
)
Both method should be changed. Please see the attached patch.
(issue imported from #M14313)
Files