Slickdeals is community-supported.  We may get paid by brands for deals, including promoted items.
27 results found matching

Show results for
$ - $
Filters
Filters
Filters
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57707870 added 02-20-2013 9:26 AM by kakomu in Archived Deals
I finally had the time to look through the links you posted plus another link I posted earlier about handling warnings. I copied/pasted some basic error handling functions that halt the program...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57712326 added 02-20-2013 11:57 AM by UniformedHorse in Archived Deals
problem is that a warning is not an error
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57715042 added 02-20-2013 1:35 PM by kakomu in Archived Deals
No. I used PHP's set_error_handler function to halt my program when PHP throws a warning. The exact thing I had requested information on. By default, PHP will halt on errors, but will not halt on...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57691264 added 02-19-2013 2:08 PM by Frogstar in Archived Deals
Classic ASP halted on errors too, unless you told it to behave otherwise. http://stackoverflow.com/questions/10520390/stop-script-execution-upon-notice-warning ?
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57692546 added 02-19-2013 3:06 PM by menace33 in Archived Deals
Had a feeling you weren't looking for help on coding, just a hunch but said it anyways. Anyhow, to answer your question, you could try PHP Compiler. I've never used it so I could not tell you how...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57681920 added 02-19-2013 8:29 AM by dealgate in Archived Deals
You need to do your own error checking and handling within your code. You cannot change the default behavior of PHP.
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57692202 added 02-19-2013 2:50 PM by kakomu in Archived Deals
If you guys do not understand what I'm writing and cannot help me with what I'm requesting, I request that you please refrain from gunking up my thread. I'm not looking for pointers on HOW to code my...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57697090 added 02-19-2013 6:50 PM by kakomu in Archived Deals
The method I was testing which led to this thread throws a warning: "Missing Argument". Variable length argument lists are something else.
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57680040 added 02-19-2013 7:11 AM by kakomu in Archived Deals
I'm writing a program in php and I'm currently testing a class I wrote. Part of testing this class involved calling a method while passing an incorrect quantity of arguments. For its part, PHP throws...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57686240 added 02-19-2013 10:55 AM by menace33 in Archived Deals
Your best way to handle this is not to alter or find a way to have PHP but to create custom error handling to enact what you want how you want it. That would be done on a program for program, file...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57690682 added 02-19-2013 1:45 PM by kakomu in Archived Deals
This isn't a problem concerning a range of variables. This isn't an issue of a user passing a string instead of an int. This is a problem wherein I define a method as: addUser($username, $id) and...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57692466 added 02-19-2013 3:01 PM by WarrenM in Archived Deals
PHP is not a compiler and cannot be forced to malfunction in the way that compilers do. What you are trying to do is not possible, sorry. Try this: public function addUser($username='', $id=-1) ...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57711702 added 02-20-2013 11:35 AM by dealgate in Archived Deals
Excellent! So you decided to add error handling to the code which is what was recommended from the beginning of the thread.
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57715254 added 02-20-2013 1:43 PM by dealgate in Archived Deals
OK so if someone puts your code on another system, what do you suppose will happen?
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57715426 added 02-20-2013 1:48 PM by UniformedHorse in Archived Deals
it will do exactly what he's programmed it to do?
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57685842 added 02-19-2013 10:41 AM by dealgate in Archived Deals
If your function is checking the input (error handling), it should be able to return a specific code if the passed variables do not match a pre-defined range and the calling code should take that...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57691582 added 02-19-2013 2:23 PM by menace33 in Archived Deals
Really bad code design if you leave it to the user to be able to call the method and not restrict their parameters to however you wish it to be. This should never ever happen. In the user form that...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57692960 added 02-19-2013 3:26 PM by UniformedHorse in Archived Deals
as you've found out, warnings are considered non-fatal and the script will continue to execute. I think you can override this behaviour with the set_error_handler function. I.e. set it to die...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57767812 added 02-22-2013 3:32 PM by WarrenM in Archived Deals
Kudos! An elegant solution.
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57682828 added 02-19-2013 9:02 AM by dude2000 in Archived Deals
You may want to read on Scripting Languages Vs Programming Languages php is scripting language and interpreted at run time not compiled. Programming Language (Java of C++)is typically first...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57691742 added 02-19-2013 2:30 PM by dude2000 in Archived Deals
I can call your method as addUser('junk data', 'more junk data') Any input supplied to your application should be treated as untrusted and passed through a validation routine to ensure that the...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57691798 added 02-19-2013 2:32 PM by SP33DFR34K in Archived Deals
You could use default arguments and then error check for that default argument
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57692874 added 02-19-2013 3:21 PM by WarrenM in Archived Deals
The number of parameters is variable in PHP, so there is no warning or error to generate. It is something that PHP programmers take advantage of regularly, for instance by allowing an object to have...
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57684938 added 02-19-2013 10:10 AM by kakomu in Archived Deals
I check all of my own code. I'm attempting to configure and write this code so that if someone else is using the class (such as in a plug-in or module setup), they don't accidentally screw things up....
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57687862 added 02-19-2013 11:51 AM by Frogstar in Archived Deals
Can't you have your code throw an exception if the inputs are not good? I'd think that should take care of it, but I haven't touched PHP in years.
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57715954 added 02-20-2013 2:10 PM by dealgate in Archived Deals
His error-handling routine is part of the PHP.ini which is a PHP system file. It does not come with the code. My point is that it is not the proper method for handling errors.
PHP Error Handling
Expired
Thread created 02-19-2013 by kakomu
0 Score 26 Replies 1,686 Views
Post #57716472 added 02-20-2013 2:30 PM by kakomu in Archived Deals
My error-handling routine is contained in a PHP file titled "errorHandler.php", which contains the following code: function errHandle($errNo, $errStr, $errFile, $errLine) { $msg = "$errStr...

More Results from Amazon.com See more at Amazon

More Results from Walmart.com See more at Walmart

More Results from Ebay.com

Didn't find what you were looking for?

We're displaying limited results because of the following settings:

  • Deals with Any Rating
  • Deals from Any Time
  • Deals from 26 forums
  • Deals filtered by and
  • Searching within Entire Threads

If you want to relax this search, click here to reset all search parameters. You can also adjust them by using the filtering options on the left.