mirror of
https://github.com/typecho/typecho.git
synced 2025-03-20 09:59:41 +01:00
修正validate
This commit is contained in:
parent
5b39b0ff48
commit
6db990f7a4
@ -186,7 +186,8 @@ class Typecho_Validate
|
||||
*/
|
||||
public function enum($str, array $params)
|
||||
{
|
||||
return in_array($str, $params);
|
||||
$keys = array_flip($params);
|
||||
return isset($keys[$str]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user