[TYPO3-core] Feature #9633: [CRASH] Implement autoloading for TYPO3

Xavier Perseguers typo3 at perseguers.ch
Tue May 19 20:13:21 CEST 2009


Xavier Perseguers wrote:
> Hi,
> 
>>> CRASH:
>>> Since update to revision 5449, DBAL does not work anymore!
>>>
>> Problem is with typo3/init.php. I'm investigating....
> 
> Without autoloading (around line 171):
> 
> require_once(PATH_t3lib.'class.t3lib_db.php');
> 
> /** @var TYPO3_DB t3lib_db */
> $TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');
> t3lib_div::debug($TYPO3_DB);
> die('');
> 
> It gives me a ux_t3lib_DB Object back.
> 
> 
> 
> With autoloader instead of require_once (same place):
> 
> require_once(PATH_t3lib . 'class.t3lib_autoloader.php');
> t3lib_autoloader::registerAutoloader();
> 
> /** @var TYPO3_DB t3lib_db */
> $TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');
> t3lib_div::debug($TYPO3_DB);
> die('');
> 
> It gives me a t3lib_DB Object back.

in t3lib_div:

protected function getClassName($className) {
	return (class_exists('ux_' . $className, false) ? 
self::getClassName('ux_' . $className) : $className);
}

How is it supposed to work? If the file containing the file is not yet 
loaded, there is no chance finding a XCLASS of this class, meaning the 
method returns the main className, not any XCLASS of it.


-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-team-core mailing list