Skip to content

Commit 798ec2e

Browse files
committed
Adjust for PHP/8.1
1 parent 39cd53f commit 798ec2e

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/config.local.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
*/
4242
$CONF['configured'] = true;
4343

44+
// Required for deprecation warnings in PHP/8.1
45+
ini_set('display_errors', 'Off');
46+
4447
$PFA_VARS = array('PFA_SETUP_PASS', 'PFA_DB_USER', 'PFA_DB_HOST', 'PFA_DB_PASS', 'PFA_DB_NAME', 'PFA_POSTFIX_SERVER', 'PFA_ABUSE_EMAIL', 'PFA_HOSTMASTER_EMAIL', 'PFA_POSTMASTER_EMAIL', 'PFA_WEBMASTER_EMAIL');
4548
$PFA_ERROR = false;
4649
foreach ($PFA_VARS AS $PFA_VAR) {
@@ -178,8 +181,8 @@ function language_hook($PALANG, $language) {
178181
// Mail Server
179182
// Hostname (FQDN) of your mail server.
180183
// This is used to send email to Postfix in order to create mailboxes.
181-
$CONF['smtp_server'] = $_ENV{'PFA_POSTFIX_SERVER'};
182-
$CONF['smtp_port'] = isset($_ENV{'PFA_POSTFIX_PORT'}) ? $_ENV{'PFA_POSTFIX_PORT'} : 25;
184+
$CONF['smtp_server'] = $_ENV['PFA_POSTFIX_SERVER'];
185+
$CONF['smtp_port'] = isset($_ENV['PFA_POSTFIX_PORT']) ? $_ENV['PFA_POSTFIX_PORT'] : 25;
183186

184187
// SMTP Client
185188
// Hostname (FQDN) of the server hosting Postfix Admin
@@ -255,10 +258,10 @@ function language_hook($PALANG, $language) {
255258
// a) a full mail address
256259
// b) only a localpart ('postmaster' => 'admin') - the alias target will point to the same domain
257260
$CONF['default_aliases'] = array (
258-
'abuse' => $_ENV{'PFA_ABUSE_EMAIL'},
259-
'hostmaster' => $_ENV{'PFA_HOSTMASTER_EMAIL'},
260-
'postmaster' => $_ENV{'PFA_POSTMASTER_EMAIL'},
261-
'webmaster' => $_ENV{'PFA_WEBMASTER_EMAIL'}
261+
'abuse' => $_ENV['PFA_ABUSE_EMAIL'],
262+
'hostmaster' => $_ENV['PFA_HOSTMASTER_EMAIL'],
263+
'postmaster' => $_ENV['PFA_POSTMASTER_EMAIL'],
264+
'webmaster' => $_ENV['PFA_WEBMASTER_EMAIL']
262265
);
263266

264267
// Mailboxes

0 commit comments

Comments
 (0)