Bug in error reporting configuration

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Forum rules
Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
amitshahc
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Apr 05, 2012 9:52 am

Bug in error reporting configuration

Post by amitshahc » Thu Apr 05, 2012 10:05 am

Hello,

I found that if in Joomla 1.5:

if configuration.php file values are:

Code: Select all

var $error_reporting = '0';
or

Code: Select all

var $error_reporting = '-1';
it will not affect/change the global value of php.ini as the joomla code that works for setting error reporting in includes/framework.php:

Code: Select all

// System configuration
$CONFIG = new JConfig();

if (@$CONFIG->error_reporting === 0) {
	error_reporting( 0 );
} else if (@$CONFIG->error_reporting > 0) {
	error_reporting( $CONFIG->error_reporting );
	ini_set( 'display_errors', 1 );
}
because the above 2 values will never satisfy any of the above conditions.

case 1: if (@$CONFIG->error_reporting === 0) will be compared with '0'. will not match. as the '0' is string value and not integer. and the === sign compares the datatype also.

case 2: for '-1' it is not meaningful. it will also not get satisfied. but the result will remain meaningful to keep the value global as per set in php.ini. so this case can be escaped from bug.

Locked

Return to “Joomla! 1.5 Bug Reporting”