[TYPO3-core] RFC Bug #11272: Autoloader floads sysLog with XCLASS failures
Oliver Hader
oliver at typo3.org
Wed Jun 10 15:16:06 CEST 2009
This is an SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=11272
Branch: Trunk
Problem:
In the sysLog many entries like this appear with using the autoloader:
04-06-09 17:20 - Core: Unable to autoload class "ux_t3lib_matchCondition"
Solution:
Use the second parameter in class_exists() in the t3lib_div functions
makeInstanceClassName() and getClassName() - e.g.
"class_exists('ux_t3lib_matchCondition', true)". This prevents files
from being autoloaded here. This parameter was removed by accident in an
earlier commit.
The sequence is like that:
call to t3lib_div::makeInstance('someClass')
-> calls getClassName('someClass')
-> loads the class 'someClass' if not available
-> if XCLASS is defined, that file will be included
at the end of the class file of 'someClass'
-> calls getClassName('ux_someClass')
...
-> has the accordant class name and creates the instance
Notes:
To test this patch, just enable the "sysLog" in the install tool and
check the contents there.
olly
--
Oliver Hader
TYPO3 Release Manager 4.3
More information about the TYPO3-team-core
mailing list