From cc2b0621d692286687444648f921c43927787dba Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Sun, 31 Jul 2005 18:03:12 +0000 Subject: [PATCH] Spamblock plugin: Discard empty values --- .../serendipity_event_spamblock.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php b/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php index 8d8c29e..a43be2a 100644 --- a/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php +++ b/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php @@ -172,7 +172,7 @@ var $filter_defaults; 'smarty' => '2.6.7', 'php' => '4.1.0' )); - $propbag->add('version', '1.21'); + $propbag->add('version', '1.22'); $propbag->add('event_hooks', array( 'frontend_saveComment' => true, 'external_plugin' => true, @@ -445,6 +445,9 @@ var $filter_defaults; $filter_authors = explode(';', $this->get_config('contentfilter_authors', $this->filter_defaults['authors'])); if (is_array($filter_authors)) { foreach($filter_authors AS $filter_author) { + if (empty($filter_author)) { + continue; + } if (preg_match('@' . $filter_author . '@', $addData['name'])) { if ($filter_type == 'moderate') { $this->log($logfile, $eventData['id'], 'MODERATE', PLUGIN_EVENT_SPAMBLOCK_FILTER_AUTHORS, $addData); @@ -466,6 +469,9 @@ var $filter_defaults; $filter_urls = explode(';', $this->get_config('contentfilter_urls', $this->filter_defaults['urls'])); if (is_array($filter_urls)) { foreach($filter_urls AS $filter_url) { + if (empty($filter_url)) { + continue; + } if (preg_match('@' . $filter_url . '@', $addData['url'])) { if ($filter_type == 'moderate') { $this->log($logfile, $eventData['id'], 'MODERATE', PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS, $addData); -- 2.39.5