diff options
| author | Frederick Muriuki Muriithi | 2026-08-18 10:03:21 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-18 10:03:21 -0500 |
| commit | 02c5eef4ae43c0d78ff87fb74865d087843b7484 (patch) | |
| tree | bfa2973ef0ad9c0d8fb5b601067b966e84c2fe9e | |
| parent | 9f820106d932ba6952a30d6165bc1d42a1fb7ab6 (diff) | |
| download | BNW-02c5eef4ae43c0d78ff87fb74865d087843b7484.tar.gz | |
Bugfix: Move variable closer to usage.
Initialise the `$TextFile` variable within the handling of the "POST" request rather than in the global scope.
| -rw-r--r-- | sourcecodes/bn_file_load_gom.php | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
