Ensure preg does not output empty array elements.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-08-07 21:44:01 +02:00
parent 07af532b09
commit 838516e558
3 changed files with 2 additions and 10 deletions

View File

@@ -85,10 +85,6 @@ function add_to_table($db, $table, $domains, $wildcardstyle=false)
$num = 0;
foreach($domains as $domain)
{
// Skip empty domains
if(strlen($domain) == 0)
continue;
if($wildcardstyle)
$domain = "(\\.|^)".str_replace(".","\\.",$domain)."$";
@@ -132,10 +128,6 @@ function remove_from_table($db, $table, $domains)
$num = 0;
foreach($domains as $domain)
{
// Skip empty domains
if(strlen($domain) == 0)
continue;
$stmt->bindValue(":domain", $domain, SQLITE3_TEXT);
if($stmt->execute() && $stmt->reset())