Procházet zdrojové kódy

Fixed Type Conversion bug (#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>
Christoph Schlaepfer před 10 měsíci
rodič
revize
113d98aec5
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      web/edit/web/index.php

+ 3 - 1
web/edit/web/index.php

@@ -124,7 +124,9 @@ if (
 
 $redirect_code_options = [301, 302];
 $v_redirect = $data[$v_domain]["REDIRECT"];
-$v_redirect_code = $data[$v_domain]["REDIRECT_CODE"];
+$v_redirect_code = isset($data[$v_domain]["REDIRECT_CODE"])
+	? intval($data[$v_domain]["REDIRECT_CODE"])
+	: 302;
 if (!in_array($v_redirect, ["www." . $v_domain, $v_domain])) {
 	$v_redirect_custom = $v_redirect;
 }