thinkPHP验证器报错filter_var(): Argument #3 ($options) must be of type array|int, null given
2024-05-10T11:13:00
这两天在写一个系统,用到了thinkPHP的验证器,环境是PHP8,所以就遇到了一个报错 TypeError: filter_var(): Argument #3 ($options) must be of type array|int, null given in,原因是在PHP8中的强类型模式中filter_var()的第三个参数默认是array|int,所以不能赋值为null