From 819ddd825b5f901d5dd6f41d80b421aa5219b7a2 Mon Sep 17 00:00:00 2001 From: henoheno Date: Fri, 17 Aug 2007 23:33:32 +0900 Subject: [PATCH] A little cleanup --- spam/spam.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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); -- 2.11.0