Skip to content

Commit 113d98a

Browse files
AnurilChristoph Schläpfer
andauthored
Fixed Type Conversion bug (hestiacp#4981)
* Fixed Type Conversion bug by casting the REDIRECT_CODE from the config file to int * Fix linting * Fixed linting again... --------- Co-authored-by: Christoph Schläpfer <c.schlaepfer@datact.ch>
1 parent e7412c3 commit 113d98a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/edit/web/index.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@
124124

125125
$redirect_code_options = [301, 302];
126126
$v_redirect = $data[$v_domain]["REDIRECT"];
127-
$v_redirect_code = $data[$v_domain]["REDIRECT_CODE"];
127+
$v_redirect_code = isset($data[$v_domain]["REDIRECT_CODE"])
128+
? intval($data[$v_domain]["REDIRECT_CODE"])
129+
: 302;
128130
if (!in_array($v_redirect, ["www." . $v_domain, $v_domain])) {
129131
$v_redirect_custom = $v_redirect;
130132
}

0 commit comments

Comments
 (0)