[TYPO3-core] RFC: #9318: Enhance and fix tslib_eidtools
Martin Kutschker
masi-no at spam-typo3.org
Sat Sep 13 16:22:26 CEST 2008
Dmitry Dulepov [typo3] schrieb:
> Hi!
>
> Martin Kutschker wrote:
>> In this case it would be better not to call $TYPO3_DB->connectDB()
>> directly, but use the underlying public function
>> $TYPO3_DB->sql_pconnect().
>>
>> Die'ing in a library function sucks!
>>
>> Alternatively I'm open to change $TYPO3_DB->connectDB() so that it takes
>> a parameter telling it not to die on error. Instead of dying it could
>> either report FALSE, return an error message or throw an exception.
>>
>> Anyway for tslb_eidttools I think a die with an error message is not the
>> right choice as it might be used in an AJAX or other non HTML contexts.
>
> Well... That function did not declare any return value before, so any
> existing scripts will continue to ignore its result. But I agree your
> approach is better than existing. Here is the update.
Thanx. +1 from reading.
The static method is not an issue for me. In fact I like it the way you
wrote it.
Masi
More information about the TYPO3-team-core
mailing list