From c705625b9061c6f608a78a322c7c285e2f2b6dfc Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 28 Jan 2020 19:01:33 +0100 Subject: [PATCH] Move startup of session earlier in CSV check phpcs-errors:0 phpunit-status:successful --- csv_check.php | 4 ++-- upload.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/csv_check.php b/csv_check.php index 88d5e6e..3bf6117 100644 --- a/csv_check.php +++ b/csv_check.php @@ -3,12 +3,12 @@ declare(strict_types = 1); error_reporting(E_ALL); ini_set('display_errors', "0"); -require_once __DIR__ . "/functions/functions.php"; - if (session_status() != PHP_SESSION_ACTIVE) { session_start(); } +require_once __DIR__ . "/functions/functions.php"; + // This array contains all available languages $allowed_langs = ['ar', 'de', 'en', 'hu', 'id', 'it', 'pl','pt']; diff --git a/upload.php b/upload.php index cde756b..c66cb4d 100644 --- a/upload.php +++ b/upload.php @@ -5,6 +5,7 @@ require_once __DIR__ . "/functions/functions.php"; $target = "csv/"; $target .= basename( $_FILES['uploaded']['name']); $targetpart = basename( $_FILES['uploaded']['name']); + //This is our size condition if ($uploaded_size > 40000000) { echo "Your file is too large.
";