The Joomla! Forum ™



Forum rules


Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Apr 05, 2012 10:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Apr 05, 2012 9:52 am
Posts: 1
Hello,

I found that if in Joomla 1.5:

if configuration.php file values are:
Code:
var $error_reporting = '0';

or
Code:
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:
// 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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group