[TYPO3-core] FYI24: #8826: calls to ini_set produces warnings
Steffen Kamper
info at sk-typo3.de
Mon Sep 1 16:14:18 CEST 2008
Dmitry Dulepov [typo3] schrieb:
> Hi!
>
> Ingo Renner wrote:
>> Please try to come up with a different solution than supressing the
>> warning with an @. The @ character is the most performance hitting
>> single character PHP offers... Please use an if() to check whether
>> ini_set is available...
>
> Such check is not reliable. function_exists() and is_callable() will
> both return true. So the only way would be to parse ini setting and
> search for ini_set there, which will take much more time than one @
> during initialization of t3lib_DB... In any case we already have lots of
> @, even in loops (and can't get rid of them, like in file_exists case).
> So in this bug @ is the best solution.
>
i agree. In general @ is a "bad" and time intensive thing and should be
omitted if possible, but there are situations where is no alternative.
ini_set is one of these.
Imho it's bad design of php himself because there is no way to catch
warnings. Having error_reporting set to allow warnings they are
displayed in each case.
Beside that, +1 on the patch from me.
vg Steffen
More information about the TYPO3-team-core
mailing list