Hello,
thanks for suggestion, will commit this
Just this code:
Code:
case 'default':
case '-1':
error_reporting($config->error_reporting);
break;
is not appropriate,
since it supposed to allow "System default", by not setting anything but it does not ...
instead it will
1.
SET some all flags of the error_reporting nn-bit integer (=Maximum)
when value is -1 (even E_ALL does not include all FLAG bits)
2. and
SET none flags
when value is 'default' (typecasted to integer it will yield ZERO) so
it will turn everything OFF instead of allowing system default
this is better:
Code:
case 'default':
case '-1':
break;
-- J2.5+ has exactly the above code too ...
all others you suggest are good !!
e.g.
the 'text' value of $config->error_reporting have a meaning are interpreted "accordingly" by the above switch will all other values that fall in the case of
** default:
are supposed to have an integer value
-- This is different for FLEXIcontent compared to Joomla:
in maximum you suggest not adding E_STRICT
which is right, once we have all PHP strict warnings removed we can remove that too
again thanks for suggestion and code contribution !!
it has crossed our mind to do it but, never got around to look into it, you saved us time with it !!
-- some 3rd party extension may disable error reporting regardless of Joomla settings
and is nice to make sure that error_reporting is running when needed