Skip to content

Commit bcb8eb1

Browse files
author
Till Brehm
committed
Merge branch '6603-warnings-due-to-the-use-of-php-8-2-in-server-php-logs' into 'develop'
Resolve "Warnings due to the use of PHP 8.2 in server.php logs" Closes #6603 See merge request ispconfig/ispconfig3!1921
2 parents 3b2cb45 + 51761b1 commit bcb8eb1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

interface/web/mail/mail_user_edit.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,14 @@ function onShowEnd() {
157157
$app->uses('quota_lib');
158158
$clientid = $app->db->queryOneRecord('SELECT `client_id` FROM `sys_group` WHERE `groupid` = ?', $this->dataRecord['sys_groupid']);
159159
$monitor_data = $app->quota_lib->get_mailquota_data($clientid, FALSE, $this->dataRecord['email']);
160-
if ($this->dataRecord['quota'] != 0) {
161-
$app->tpl->setVar("used_percentage", round($monitor_data['used'] * 100 / $this->dataRecord['quota']));
162-
}
163-
$app->tpl->setVar('used', $app->functions->formatBytes($monitor_data['used'], 0));
160+
if(!empty($monitor_data) && is_array($monitor_data)) {
161+
if ($this->dataRecord['quota'] != 0 && isset($monitor_data['used'])) {
162+
$app->tpl->setVar("used_percentage", round($monitor_data['used'] * 100 / $this->dataRecord['quota']));
163+
}
164+
if(isset($monitor_data['used'])) {
165+
$app->tpl->setVar('used', $app->functions->formatBytes($monitor_data['used'], 0));
166+
}
167+
}
164168

165169
# Get addresses for this account.
166170
$addresses = $app->db->queryAllRecords("SELECT source, type FROM mail_forwarding WHERE destination = ? AND ".$app->tform->getAuthSQL('r'), $email);
@@ -345,7 +349,6 @@ function onAfterInsert() {
345349
$disablesmtp = ($this->dataRecord["disablesmtp"])?'y':'n';
346350
$disabledeliver = ($this->dataRecord["disabledeliver"])?'y':'n';
347351

348-
$app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $this->id);
349352
$sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disablelmtp = ? WHERE mailuser_id = ?";
350353
$app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disabledeliver, $this->id);
351354
}

interface/web/mail/templates/mail_domain_edit.htm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@
135135

136136
</div>
137137

138-
139-
140138
<input type="hidden" name="id" value="{tmpl_var name='id'}">
141139
<input type="hidden" name="type" value="local">
142140
<div class="clear">

0 commit comments

Comments
 (0)