[TYPO3-english] Class 't3lib_div' not found

Deyan Yankov deyan at goos.dk
Thu Mar 1 08:55:17 CET 2012


Hello.

I have the following error in one of my plugins.

Fatal error: Class 't3lib_div' not found in 
C:\xampp\htdocs\EclipseProjects\IDECORimages\trunk\typo3conf\ext\idecorimages\classes\models\public.php 
on line 135

Here is the 135 row (see row numbers in the screenshot attached):

	public function getDB(){
		if (!TYPO3_db)	{
			return;
		}		
		if (!isset($GLOBALS['TYPO3_DB'])) {
			$GLOBALS['TYPO3_DB'] = t3lib_div::makeInstance('t3lib_db');
			if (!$GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, 
TYPO3_db_username, TYPO3_db_password) ||
				!$GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db)) {
					// Cannot connect to database
					return;
			}else{
				return $GLOBALS['TYPO3_DB'];				
			}
		}else{
			return $GLOBALS['TYPO3_DB'];
		}
	}

Could you please help me with this problem? Why it cannot find the 
t3lib_div class, and how to load it together with the corresponding classes?

Regards,
Deyan Yankov
Goos Web Division


More information about the TYPO3-english mailing list