Dummy protect

This commit is contained in:
bzick 2015-02-01 01:13:39 +03:00
parent fb544b10e8
commit 5d87060f42
1 changed files with 6 additions and 4 deletions

View File

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