$TFA_SAMP->createUser($_GET['email'], $_GET['cellphone'], $_GET['area_code']);
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
The non-existing variables are accessed here. Nobody cares that you're later checking for isset
on completely different variables and are throwing exceptions, the problem is in the above line. You need to fix it there. For example:
$args = $_GET + array('email' => null, 'cellphone' => null, 'area_code' => null);
$TFA_SAMP->createUser($args['email'], $args['cellphone'], $args['area_code']);
Alternatively, use isset
statements here and throw exceptions for missing user input.
Basically, the code which touches $_GET
deals with completely unpredictable user input. That's your first line of defence in which you need to check for existing or non-existing values. You can't roll this as responsibility into code which comes later.