Perrin, you are right. I got clogged down in the if that I was showing you that I didn't consider the calling method.
There was nothing wrong with the code that I put in before, the problem was that the method containing that code, is_input_valid, was called within a conditional that didn't check if it was defined, and eval'd '0' as false. ie.
unless ( is_input_valid() ) {
report_bad_input();
}
And the proper code should have been,
unless ( defined is_input_valid() ) {
report_bad_input();
}
Very careless of me. I apologize. Thank you for the help. | [reply] [d/l] [select] |
Good. You know, is_bad_input sounds like it's just going to return 1 or 0, so if you intend to have it return the input I'd name it something like clean_input.
| [reply] |