From 02c5eef4ae43c0d78ff87fb74865d087843b7484 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 18 Aug 2026 10:03:21 -0500 Subject: Bugfix: Move variable closer to usage. Initialise the `$TextFile` variable within the handling of the "POST" request rather than in the global scope. --- sourcecodes/bn_file_load_gom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sourcecodes/bn_file_load_gom.php') diff --git a/sourcecodes/bn_file_load_gom.php b/sourcecodes/bn_file_load_gom.php index 0074d673..e52a1e43 100644 --- a/sourcecodes/bn_file_load_gom.php +++ b/sourcecodes/bn_file_load_gom.php @@ -13,7 +13,6 @@ include("runtime_check.php"); include("input_validate.php"); $searchID=""; $UploadValue="NO"; -$TextFile=$_FILES["MyFile"]["name"]; /////////////Generate a random key///////////////////// @@ -67,6 +66,7 @@ if(isset($_POST["MyUpload"])) $UploadValue=$_POST["MyUpload"]; if ($UploadValue=="YES") { + $TextFile=$_FILES["MyFile"]["name"]; if($TextFile!="") { // $TextFile = valid_input($TextFile); -- cgit 1.4.1