I just found the following note in PHP Manual (@see: entry for is_int())

*Note: *

*To test if a variable is a number or a numeric string (such as form input,
which is always a string), you must use is_numeric()<function.is-numeric.html>.
*
OK. I'll place an issue in the tracker.
Thank you for your attention.


On Feb 1, 2008 6:18 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:

> -- AmirBehzad Eslami <[EMAIL PROTECTED]> wrote
> (on Friday, 01 February 2008, 05:47 PM +0330):
> > >> My understanding is
> > >> that PHP will convert it to an integer before sending it anyways.
> >
> > No. In my experience an exception thrown
> > @see: Controller/Response/Abstract.php , Line 230
> >
> >         if (!is_int($code) || (100 > $code) || (599 < $code)) {
> >             require_once 'Zend/Controller/Response/Exception.php';
> >             throw new Zend_Controller_Response_Exception('Invalid HTTP
> response
> > code');
> >         }
>
> So, what I'm thinking is that instead of checking for is_int(), we
> should cast to int prior to any other checks. That way, both '303' and
> 303 will work, and users don't need to be worried about the specific
> type they send.
>
> Can you place an issue in the tracker for this?
>
> --
> Matthew Weier O'Phinney
> PHP Developer            | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
>

Reply via email to