Move startup of session earlier in CSV check

phpcs-errors:0 phpunit-status:successful
This commit is contained in:
Joshua Ramon Enslin 2020-01-28 19:01:33 +01:00 committed by Stefan Rohde-Enslin
parent c6147293f6
commit c705625b90
2 changed files with 3 additions and 2 deletions

View File

@ -3,12 +3,12 @@ declare(strict_types = 1);
error_reporting(E_ALL); error_reporting(E_ALL);
ini_set('display_errors', "0"); ini_set('display_errors', "0");
require_once __DIR__ . "/functions/functions.php";
if (session_status() != PHP_SESSION_ACTIVE) { if (session_status() != PHP_SESSION_ACTIVE) {
session_start(); session_start();
} }
require_once __DIR__ . "/functions/functions.php";
// This array contains all available languages // This array contains all available languages
$allowed_langs = ['ar', 'de', 'en', 'hu', 'id', 'it', 'pl','pt']; $allowed_langs = ['ar', 'de', 'en', 'hu', 'id', 'it', 'pl','pt'];

View File

@ -5,6 +5,7 @@ require_once __DIR__ . "/functions/functions.php";
$target = "csv/"; $target = "csv/";
$target .= basename( $_FILES['uploaded']['name']); $target .= basename( $_FILES['uploaded']['name']);
$targetpart = basename( $_FILES['uploaded']['name']); $targetpart = basename( $_FILES['uploaded']['name']);
//This is our size condition //This is our size condition
if ($uploaded_size > 40000000) { if ($uploaded_size > 40000000) {
echo "Your file is too large.<br>"; echo "Your file is too large.<br>";