Q:

Why would my WP plugin work for one person and not another on the same system?

My cousin and I built a WordPress plugin for CoursePress that will take in a list of email addresses, and add them as users/students into a course.
We have used this plugin on multiple occasions without fail, but one client of ours told us that the plugin would not work for them. I have screen shared and verified that they are using the plugin correctly.
The plugin takes in a .csv file in "Email,FirstName,LastName,CompanyName" format, adds users based on that data, adds those users as students to selected course, and prompts you to download a new .csv file that will contain user names and passwords from created users.
You can see the code HERE
My initial thought was that Windows and Mac/Linux save .csv files with different line endings, so maybe that is the problem, but I sent this person a file that I saved through my MacBook and instructed to not open the file but to just try to use it in the plugin to see if it works. Still nothing.
I have made some edits in the uploads.php file to try to narrow down the problem, but I am not making any progress.
In the edits below, I am trying to see if the "uploaded_file" post variable is empty, and if it is, to tell me it is. The current error my client is having is "There was an error during file validation!". I am pretty sure his error should be reading the $ers variable from below, but I cannot get it to give me that error when I submit the form without a file.
Can anyone help me?
<?php
function wp_mail()
{
    // Do nothing!
}

error_reporting(0);

require_once('../../../../wp-config.php');
include 'gen-file.php';

//Posted files

$files = $_FILES["uploaded_file"];
if (empty($files)) {
    $ers = 'The file was not sent with the form!';
  }

$post = $_POST;
//Imported users CsV
$impUsers =  array(array( "Username", "Password", "email" ),);

$file = checkFile($files);

if($file){
    $ID = getCid($post);
    $tmpname = $file['tmp_name'];
    //Convert CSV to array
    $csv = array_map('str_getcsv', file($tmpname));
    //Remove first row in CSV Array
    $csv = array_splice($csv, 1);
    //Create Users
    $Users = createUsers($csv);
    //Add users to course
    $students = AddAsStudents($Users,$ID);

    convert_to_csv($Users);
    }else{

    echo 'There was an error during file validation! </br>';
    echo $ers;
        }

A:

The problem lies in your checkFile() function.  The function is using the $_FILES['userfile']['type'] as a part of validation.  However, as stated in the documentation:

$_FILES['userfile']['type'] - The mime type of the file, if the browser provided this information.This mime type is however not checked on the PHP side and therefore don't take its value for granted.

Therefore, different browsers may send different values or no value at all, so you can't depend on it.
You can probably just remove that from your check on this line:
if (($ext == "csv") && ($files["type"] == "text/csv") && ($files["size"] < 350000))

and use:
if (($ext == "csv") && ($files["size"] < 350000))

