[TYPO3-core] RFC #7357: Use exceptions to detect missing user function

Oliver Klee typo3-german-02 at oliverklee.de
Sat Feb 2 17:03:53 CET 2008


Hi Masi,

Martin Kutschker schrieb:
>> Please use ($errorMode == 0) instead of (!$errorMode) because this will
>> make the code a lot easier to read (I nearly gave you a -1 because the
>> new code didn't seem to match the new function documentation).
> 
> I did this on purpose. See my decription: "To be compatible any true
> value except 2 means silent. "

Hm, maybe a "$errorMode != 1" then would make the intent clearer.

>> Actually, we now have this code three times - this is a bad smell.
>> Please refactor it to a separate function.
> 
> What do you suggest? Add a private static function to t3lib_div for that
> purpose? Or maybe an inline function within callUserFunction() is more
> to your taste?

I'll like a private static function best.

Regards,


Oliver


More information about the TYPO3-team-core mailing list