PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Wed Nov 23, 2005 12:43 am Reply with quote Back to top

There is now code in mainfile.php that tries to facilitate when errors are displayed. It utilizes the $display_errors setting in config.php which was introduced in v7.7. The code in mainfile.php reads
Code:
// Error reporting, to be set in config.php
if($display_errors) {
  @ini_set('display_errors', 1);
  error_reporting(E_ALL^E_NOTICE);
} else {
  @ini_set('display_errors', 0);
  error_reporting(0);
}


This is not good, imo, as written. Better would be this
Code:
// Error reporting, to be set in config.php
error_reporting(E_ALL^E_NOTICE);
if($display_errors) {
  @ini_set('display_errors', 1);
}
 else {
  @ini_set('display_errors', 0);
}


Why? If you turn error_reporting off with the error_reporting(0); code, then the errors will not even get written to the error log, which makes it extremely frustrating for anyone trying to debug Mad You need to always leave the error_reporting to a minimum of error_reporting(E_ALL^E_NOTICE);

This is MY opinion and it DOES represent the position of the management at this site Wink ROTFL
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Nov 23, 2005 2:09 am Reply with quote Back to top

Good idea to me! Let's make sure this gets into the latest Patched files

I actually turn on notices when I'm working on things too, so that I'm not doing something that's just bad coding... missing array indexes, using undefined variables, etc.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Wed Nov 23, 2005 2:13 am Reply with quote Back to top

I agree with the Notices. But, you know how the general community panics when they see all those ROTFL. So, with the lesser, it saves on new/repeated posts Wink. Good post though Cheers
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Wed Nov 23, 2005 11:58 am Reply with quote Back to top

Raven wrote:
This is MY opinion and it DOES represent the position of the management at this site Wink ROTFL

Avoid those at all cost, you should hear the stories i have on them, scary stuff. Shocked

Regarding this code why not take out error_reporting(0); so those not wanting notices dont have them on at all times? Either way i have switched it to the above code in my local copy.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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 vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum