[TYPO3-english] Class 't3lib_div' not found

Dmitry Dulepov dmitry.dulepov at gmail.com
Thu Mar 1 13:04:46 CET 2012


Hi!

Deyan Yankov wrote:
> Here is the 135 row (see row numbers in the screenshot attached):

Please, do not attach images here. Post your image somewhere and attach the 
URL.

> 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'];
> }
> }

Can't comment. This looks like a hack, which does not conform to any TYPO3 
standard patterns.

-- 
Dmitry Dulepov
TYPO3 core team member
Blog: http://dmitry-dulepov.com/
Twitter: http://twitter.com/dmitryd

Simplicity will save the world.



More information about the TYPO3-english mailing list