Skip to content

Commit

Permalink
Update FILTER_NULL_ON_FAILURE usage
Browse files Browse the repository at this point in the history
Closes GH-679.
  • Loading branch information
realFlowControl committed Jun 10, 2021
1 parent 8dd14a8 commit 35c2cd3
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions reference/filter/filters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
<parameter>default</parameter>
</entry>
<entry>
<constant>FILTER_FLAG_HOSTNAME</constant>
<constant>FILTER_FLAG_HOSTNAME</constant>,
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>
<para>
Expand All @@ -74,7 +75,8 @@
<parameter>default</parameter>
</entry>
<entry>
<constant>FILTER_FLAG_EMAIL_UNICODE</constant>
<constant>FILTER_FLAG_EMAIL_UNICODE</constant>,
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>
<para>
Expand All @@ -98,7 +100,8 @@
<parameter>max_range</parameter>
</entry>
<entry>
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>,
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>Validates value as float, optionally from the specified range, and converts to float on success.</entry>
</row>
Expand All @@ -112,7 +115,8 @@
</entry>
<entry>
<constant>FILTER_FLAG_ALLOW_OCTAL</constant>,
<constant>FILTER_FLAG_ALLOW_HEX</constant>
<constant>FILTER_FLAG_ALLOW_HEX</constant>,
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>Validates value as integer, optionally from the specified range, and converts to int on success.</entry>
</row>
Expand All @@ -126,7 +130,8 @@
<constant>FILTER_FLAG_IPV4</constant>,
<constant>FILTER_FLAG_IPV6</constant>,
<constant>FILTER_FLAG_NO_PRIV_RANGE</constant>,
<constant>FILTER_FLAG_NO_RES_RANGE</constant>
<constant>FILTER_FLAG_NO_RES_RANGE</constant>,
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>
Validates value as IP address, optionally only IPv4 or IPv6 or not
Expand All @@ -139,7 +144,9 @@
<entry>
<parameter>default</parameter>
</entry>
<entry></entry>
<entry>
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>Validates value as MAC address.</entry>
</row>
<row>
Expand All @@ -149,7 +156,9 @@
<parameter>default</parameter>,
<parameter>regexp</parameter>
</entry>
<entry></entry>
<entry>
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>
Validates value against <parameter>regexp</parameter>, a
<link linkend="book.pcre">Perl-compatible</link> regular expression.
Expand All @@ -165,7 +174,8 @@
<constant>FILTER_FLAG_SCHEME_REQUIRED</constant>,
<constant>FILTER_FLAG_HOST_REQUIRED</constant>,
<constant>FILTER_FLAG_PATH_REQUIRED</constant>,
<constant>FILTER_FLAG_QUERY_REQUIRED</constant>
<constant>FILTER_FLAG_QUERY_REQUIRED</constant>,
<constant>FILTER_NULL_ON_FAILURE</constant>
</entry>
<entry>Validates value as URL (according to <link xlink:href="&url.rfc;2396">&url.rfc;2396</link>), optionally with required components. Beware a valid URL may not specify the HTTP protocol <literal>http://</literal> so further validation may be required to determine the URL uses an expected protocol, e.g. <literal>ssh://</literal> or <literal>mailto:</literal>. Note that the function will only find ASCII URLs to be valid; internationalized domain names (containing non-ASCII characters) will fail.</entry>
</row>
Expand Down Expand Up @@ -596,11 +606,10 @@ filter.default_flags = 0
<row>
<entry><constant>FILTER_NULL_ON_FAILURE</constant></entry>
<entry>
<constant>FILTER_VALIDATE_BOOLEAN</constant>,
<constant>FILTER_VALIDATE_BOOL</constant>
any <link linkend="filter.filters.validate"><constant>FILTER_VALIDATE_*</constant></link>
</entry>
<entry>
Returns &null; for unrecognized boolean values.
Returns &null; for unrecognized values.
</entry>
</row>
<row>
Expand Down

0 comments on commit 35c2cd3

Please sign in to comment.