Project

General

Profile

Actions

Bug #22594

closed

Class prefix problem in getUserObj and callUserFunction (t3lib_div)

Added by Jean-David Gadina over 14 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2010-05-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

t3lib_div.patch (781 Bytes) t3lib_div.patch Administrator Admin, 2010-05-05 17:43
BUGFIX-14313.patch (555 Bytes) BUGFIX-14313.patch Administrator Admin, 2011-01-18 18:01

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #25704: Use consistent class namesClosedTolleiv Nietsch2011-04-01

Actions
Actions

Also available in: Atom PDF