|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50633 Add constant FILTER_EXCEPTION_ON_FAILURE to throw exceptions
Submitted: 2010-01-02 09:47 UTC Modified: 2010-12-01 16:25 UTC
Avg. Score:3.9 ± 1.7
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:5 (100.0%)
From: gmblar+php at gmail dot com Assigned:
Status: Open Package: Filter related
PHP Version: 5.3.1 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gmblar+php at gmail dot com
New email:
PHP Version: OS:


 [2010-01-02 09:47 UTC] gmblar+php at gmail dot com
Add constant FILTER_EXCEPTION_ON_FAILURE to throw meaningful exceptions 
why filter fails

Reproduce code:

$foo = filter_input(INPUT_GET, 'foo', FILTER_VALIDATE_INT, array(
    'options' => array(
        'min_range' => 5,
        'max_range' => 42



Expected result:
Fatal error: Uncaught exception 'OutOfBoundsException' with message 'foo 
must an integer in range between 5 and 42' in input.php:3 Stack trace: 
#0 {main} thrown in input.php on line 3

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-01 16:25 UTC]
-Package: Feature/Change Request +Package: Filter related
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 21:01:31 2024 UTC