From 7f4159ac258c501f9666efc465a78cb2aec9d177 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Mon, 21 Sep 2020 21:21:30 +0200 Subject: Code cleanup - Remove unused variables - Remove unused utility functions - Asserting presence and typehinting global variables - Remove unused variables - Add missing global - Add parameter type constraint - Fix some references to nonexisting variables --- ratatoeskr/setup/setup.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ratatoeskr/setup/setup.php') diff --git a/ratatoeskr/setup/setup.php b/ratatoeskr/setup/setup.php index 3e3be9c..749315a 100644 --- a/ratatoeskr/setup/setup.php +++ b/ratatoeskr/setup/setup.php @@ -9,6 +9,9 @@ require_once(dirname(__FILE__) . "/../sys/pwhash.php"); require_once(dirname(__FILE__) . "/../languages.php"); require_once(dirname(__FILE__) . "/create_tables.php"); +/** @var \ste\STECore $ste */ +assert(isset($ste)); + $rel_path_to_root = "."; $ste->vars["rel_path_to_root"] = $rel_path_to_root; @@ -21,6 +24,9 @@ foreach ($languages as $langcode => $langinfo) { if (isset($_GET["lang"]) and (@$languages[$_GET["lang"]]["translation_exist"])) { load_language($_GET["lang"]); + + assert(isset($translation)); + $lang = $_GET["lang"]; $ste->vars["lang"] = $_GET["lang"]; } else { -- cgit v1.2.3-70-g09d2