Justgiving api image upload code

apparently there is a issue their end with the api
function updateUserPhoto($profile, $client) {
       
    if($_FILES["newPhoto"]["size"] == 0) { return "empty"; }
    
    if ((($_FILES["newPhoto"]["type"] == "image/gif")
    || ($_FILES["newPhoto"]["type"] == "image/jpeg")
    || ($_FILES["newPhoto"]["type"] == "image/pjpeg"))
    && ($_FILES["newPhoto"]["size"] < 2000000)) {
        if ($_FILES["newPhoto"]["error"] > 0) {
            echo "<p>Error: " . $_FILES["newPhoto"]["error"] . "</p>";
            return;
        }
    } else {
        echo "<p>Invalid photo file: Must be .jpg or .gif and less than 2MB in size.</p>";
        return;
    } 
    
    $response = $client->Page->UploadImage($profile["JustGivingCustomURL"],"",$_FILES["newPhoto"]["tmp_name"],$_FILES["newPhoto"]["type"]);
    
    return $response;
    
}