Dummy protect

This commit is contained in:
bzick 2015-02-01 01:13:39 +03:00
parent fb544b10e8
commit 5d87060f42

View File

@ -170,11 +170,13 @@ class Modifier
*/ */
public static function in($value, $haystack) public static function in($value, $haystack)
{ {
if(is_scalar($value)) {
if (is_array($haystack)) { if (is_array($haystack)) {
return in_array($value, $haystack) || array_key_exists($value, $haystack); return in_array($value, $haystack) || array_key_exists($value, $haystack);
} elseif (is_string($haystack)) { } elseif (is_string($haystack)) {
return strpos($haystack, $value) !== false; return strpos($haystack, $value) !== false;
} }
}
return false; return false;
} }