[UPHPU] class breakage

Alvaro Carrasco alvaro at epliant.com
Tue Oct 10 11:32:14 MDT 2006


Steve Dibb wrote:
> jtaber wrote:
>> As a user, (and I try to place myself that way) I've always found 
>> that a validation process works best - maybe an ajax validation right 
>> in the entry form with an alert box that tells the user what is 
>> wrong.  The wrong data should never reach the functions. 
> Well this isn't for the user.  This is for the developer.
>
> So if the code passes in $foo->($string, $int);
>
> and is expecting a string instead of an integer on the second 
> variable, how should it react?
>
> Steve
>
>

If you're using php5, i would throw an exception. Otherwise, depending 
on whether the error is recoverable or not, trigger a warning or a fatal 
error.

Alvaro



More information about the UPHPU mailing list