Skip to content

Commit 184c2de

Browse files
author
davydovct
committed
Fix url_exclusion config
1 parent 5dbc80d commit 184c2de

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cleantalk.antispam/custom_config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CleantalkCustomConfig
77

88
function __construct()
99
{
10-
$this->cleantalk_url_exclusions = explode(',', trim($this->cleantalk_url_exclusions));
10+
$this->cleantalk_url_exclusions = (!empty($this->cleantalk_url_exclusions) ? explode(',', trim($this->cleantalk_url_exclusions)) : null);
1111
}
1212
public function get_url_exclusions()
1313
{

cleantalk.antispam/include.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ function OnEventLogGetAuditTypesHandler(){
909909
function OnEndBufferContentHandler(&$content) {
910910
$custom_config = new CleantalkCustomConfig();
911911
$url_exclusion = $custom_config->get_url_exclusions();
912-
if (!empty($url_exclusion))
912+
if ($url_exclusion)
913913
{
914914
foreach ($url_exclusion as $key=>$value)
915915
if (strpos($_SERVER['REQUEST_URI'],$value) !== false)
@@ -1085,7 +1085,7 @@ static function CheckAllBefore(&$arEntity, $bSendEmail = FALSE) {
10851085
}
10861086
$custom_config = new CleantalkCustomConfig();
10871087
$url_exclusion = $custom_config->get_url_exclusions();
1088-
if (!empty($url_exclusion))
1088+
if ($url_exclusion)
10891089
{
10901090
foreach ($url_exclusion as $key=>$value)
10911091
if (strpos($_SERVER['REQUEST_URI'],$value) !== false)

0 commit comments

Comments
 (0)