diff --git a/get_credential.php b/get_credential.php index d0f840a4..fb1b8a84 100644 --- a/get_credential.php +++ b/get_credential.php @@ -1,13 +1,17 @@ 0){ - $row = mysqli_fetch_array($sql_logins); - $data['found'] = "TRUE"; - $data['username'] = htmlentities($row['login_username']); - $data['password'] = decryptLoginEntry($row['login_password']); - echo json_encode($data); + if(mysqli_num_rows($sql_logins) > 0){ + $row = mysqli_fetch_array($sql_logins); + $data['found'] = "TRUE"; + $data['username'] = htmlentities($row['login_username']); + $data['password'] = decryptLoginEntry($row['login_password']); + echo json_encode($data); + } } }