Skip to content

Commit 8fe9ab6

Browse files
committed
Fixed PHP notices in mailman installer.
1 parent deff20f commit 8fe9ab6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,9 @@ public function configure_mailman($status = 'insert') {
523523
$lines = explode("\n", $old_file);
524524
foreach ($lines as $line)
525525
{
526-
if (strlen($line) && substr($line, 0, 1) != '#')
526+
if (trim($line) != '' && substr($line, 0, 1) != '#')
527527
{
528-
list($key, $value) = explode("=", $line);
528+
@list($key, $value) = @explode("=", $line);
529529
if (!empty($value))
530530
{
531531
$key = rtrim($key);
@@ -540,13 +540,15 @@ public function configure_mailman($status = 'insert') {
540540
// create virtual_domains list
541541
$domainAll = $this->db->queryAllRecords("SELECT domain FROM mail_mailinglist GROUP BY domain");
542542

543+
if(is_array($domainAll)) {
543544
foreach($domainAll as $domain)
544545
{
545546
if ($domainAll[0]['domain'] == $domain['domain'])
546547
$virtual_domains .= "'".$domain['domain']."'";
547548
else
548549
$virtual_domains .= ", '".$domain['domain']."'";
549550
}
551+
}
550552
}
551553
else
552554
$virtual_domains = "' '";

0 commit comments

Comments
 (0)