Extension: filterenhancementgood first issue
倉庫指標
- 星標
- (596 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
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.