Skip to content

Commit e6b393a

Browse files
authored
Fix few php error caused by the upgrade to 8.1.x (hestiacp#2515)
1 parent 3ee1175 commit e6b393a

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

web/add/key/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
$data = json_decode(implode('', $output), true);
2828
unset($output);
2929
$keylist = array();
30+
$idlist = array();
3031
foreach ($data as $key => $value) {
3132
$idlist[] = trim($data[$key]['ID']);
3233
$keylist[] = trim($data[$key]['KEY']);

web/list/web-log/index.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,25 @@
22

33
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
44

5+
$TAB = "WEB";
6+
7+
$v_domain = escapeshellarg($_GET['domain']);
8+
$type = 'access';
9+
if ($_GET['type'] == 'access') {
10+
$type = 'access';
11+
}
12+
if ($_GET['type'] == 'error') {
13+
$type = 'error';
14+
}
515
// Header
616
include($_SERVER['DOCUMENT_ROOT'].'/templates/pages/list_weblog.html');
717

8-
$v_domain = escapeshellarg($_GET['domain']);
9-
if ($_GET['type'] == 'access') $type = 'access';
10-
if ($_GET['type'] == 'error') $type = 'error';
1118

12-
exec (HESTIA_CMD."v-list-web-domain-".$type."log $user ".$v_domain, $output, $return_var);
1319

14-
if ($return_var == 0 ) {
15-
foreach($output as $file) {
20+
exec(HESTIA_CMD."v-list-web-domain-".$type."log $user ".$v_domain, $output, $return_var);
21+
22+
if ($return_var == 0) {
23+
foreach ($output as $file) {
1624
echo htmlentities($file) . "\n";
1725
}
1826
}

web/templates/pages/list_weblog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
</div>
3838
</div>
3939

40-
<div style="margin-left: auto; margin-right: auto; padding-top: 80px; width: 1020px;"><?=_('Last 70 lines of %s.%s.log',htmlentities($_GET['domain']),htmlentities($_GET['type'])) ;?></div>
40+
<div style="margin-left: auto; margin-right: auto; padding-top: 80px; width: 1020px;"><?=sprintf(_('Last 70 lines of %s.%s.log'),htmlentities($_GET['domain']),htmlentities($type)) ;?></div>
4141
<pre style="width: 1020px; margin-left: auto; margin-right: auto;" class="console-output">

0 commit comments

Comments
 (0)