return;
}
}
+
+ /* The FILTER_NULL_ON_FAILURE flag inverts the usual return values of
+ * the function: normally when validation fails false is returned, and
+ * when the input value doesn't exist NULL is returned. With the flag
+ * set, NULL and false should be returned, respectively. Ergo, although
+ * the code below looks incorrect, it's actually right. */
if (filter_flags & FILTER_NULL_ON_FAILURE) {
RETURN_FALSE;
} else {
PHP_FILTER_GET_LONG_OPT(option, filter_flags);
}
}
+
+ /* The FILTER_NULL_ON_FAILURE flag inverts the usual return values of
+ * the function: normally when validation fails false is returned, and
+ * when the input value doesn't exist NULL is returned. With the flag
+ * set, NULL and false should be returned, respectively. Ergo, although
+ * the code below looks incorrect, it's actually right. */
if (filter_flags & FILTER_NULL_ON_FAILURE) {
RETURN_FALSE;
} else {