TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-20-2009, 09:45 PM   #1 (permalink)
The Wanderer
 
sunwukung's Avatar
 
Join Date: Jul 2009
Location: Bristol
Posts: 8
Thanks: 0
sunwukung is on a distinguished road
Default passing a string to error_reporting

Hi folks
I'm playing around with some custom error handling routines, which I've wrapped in a utility class. The constructor determines if the script is executing local/live and changes the error display parameters accordingly. I've created a setter method i.e:
Code:
$obj->setErrorMode($level,$log);
The first argument is the reporting level, the second is an optional log file. My problem is that if I try and pass anything other than the integer label for the error_reporting level, be it a string or a constant, it stops the error reporting working. This in itself is not a massive problem, but makes the method a bit less user friendly.

Can anyone shed any light or give me some ideas how I could make this work (regardless of the OOP applicability in this situation)?
sunwukung is offline  
Reply With Quote
Old 09-20-2009, 11:32 PM   #2 (permalink)
The Wanderer
 
sunwukung's Avatar
 
Join Date: Jul 2009
Location: Bristol
Posts: 8
Thanks: 0
sunwukung is on a distinguished road
Default

solved, I was using E_STRICT which was not producing the result I expected.
sunwukung is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
who can tell me why? kuigg Absolute Beginners 9 12-02-2008 02:14 AM
array elements into variables and values Dave Absolute Beginners 7 06-20-2008 01:56 PM
Passing multiple arguments to a function via one variable. delayedinsanity Advanced PHP Programming 10 05-07-2008 05:04 AM
Quicker String Verification Jay Tips & Tricks 16 12-30-2007 01:47 PM
Lowdown on Passing Things as Reference Wildhoney General 0 09-28-2007 10:57 AM


All times are GMT. The time now is 04:59 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design