View Single Post
Old 05-18-2009, 01:19 PM   #5 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

You can suppress errors, although it's not recommended, by adding an @ symbol in front of the function:

php Code:
@ping();

The better way is to, as Hightowers suggested, set up different modes of error displaying for different users. For yourself, the developer, you want to see these warnings, but users don't.

To not show warnings you can do:

php Code:
error_reporting(0);
/* Or... */
ini_set('display_errors', 'off');

Note to self: Type quicker next time so that sketchMedia doesn't beat me to it. Git!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote