Skip to content

Commit b7f836a

Browse files
committed
Remove comments before passing to postconf, fixes #5756
1 parent 51f6c96 commit b7f836a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

install/lib/installer_base.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,9 @@ public function configure_postfix($options = '') {
11691169
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
11701170
}
11711171

1172+
// Remove comment lines, these would give fatal errors when passed to postconf.
1173+
$postconf_commands = array_filter($postconf_commands, function($line) { return preg_match('/^[^#]/', $line); });
1174+
11721175
//* These postconf commands will be executed on installation only
11731176
if($this->is_update == false) {
11741177
$postconf_commands = array_merge($postconf_commands, array(

0 commit comments

Comments
 (0)