|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-03 22:58 UTC] svn@php.net
[2010-01-03 22:58 UTC] iliaa@php.net
[2010-01-05 12:25 UTC] svn@php.net
[2010-01-27 17:22 UTC] svn@php.net
[2010-01-28 01:45 UTC] svn@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ if $_GET['foo'] is undefined, filter functions return NULL instead of the default value defined in options. Reproduce code: --------------- <?php $foo = filter_input(INPUT_GET, 'foo', FILTER_VALIDATE_INT, array( 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'default' => 23, 'min_range' => 5, 'max_range' => 42 ) )); var_dump($foo); ?> Expected result: ---------------- int(23) Actual result: -------------- NULL