X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki_sandbox.git;a=blobdiff_plain;f=spam%2Fspam.php;h=3cc34ffed96d6cc6714edd41399f6ae1819d8af3;hp=b4908a36f1482ddc2bce7bf36904b3ccae210a01;hb=819ddd825b5f901d5dd6f41d80b421aa5219b7a2;hpb=36d37ff1472fe5de0f11af9337327d2794d7031d diff --git a/spam/spam.php b/spam/spam.php index b4908a3..3cc34ff 100644 --- a/spam/spam.php +++ b/spam/spam.php @@ -1,5 +1,5 @@ 'to'), $force = FAL if (! is_array($array) || ! is_array($keys)) return FALSE; // Nondestructive test - if (! $force) - foreach(array_keys($keys) as $from) - if (! isset($array[$from])) + if (! $force) { + foreach(array_keys($keys) as $from) { + if (! isset($array[$from])) { return FALSE; + } + } + } foreach($keys as $from => $to) { if ($from === $to) continue; @@ -317,7 +320,6 @@ function generate_host_regex($string = '', $divider = '/') if (mb_strpos($string, '.') === FALSE) return generate_glob_regex($string, $divider); - $result = ''; if (is_ip($string)) { // IPv4 return generate_glob_regex($string, $divider);