the file extesnion validation is failing.
the preg_replace function is triming the period from the file externsion. change the code:
$WAFV_Errors .= WAValidateFE(((isset($_FILES["foto"]))? preg_replace('/^.*\./', '', $_FILES["foto"]["name"]) :"") . "",".gif, .jpg, .jpeg, .png",true,4);
to:
$WAFV_Errors .= WAValidateFE(((isset($_FILES["foto"]))? preg_replace('/^.*\./', '', $_FILES["foto"]["name"]) :"") . "","gif, jpg, jpeg, png",true,4);