Extension: filterenhancementgood first issue
Repository-Metriken
- Stars
- (596 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 99T 23h) (90 gemergte PRs in 30 T)
Beschreibung
From manual page: https://php.net/function.filter-var
There is no example with if and I saw a lot of implementations like:
if (!filter_var($value, $type)) {
echo 'error';
}
and it should be:
if (filter_var($value, $type) !== $value) {
echo 'error';
}
Especially, when you validated with FILTER_VALIDATE_BOOLEAN filter.