enterRaffle does not check if the newPlayers array is empty
The enterRaffle function does not currently check if the newPlayers array is empty. If an empty array is passed, the function will revert due to the require statement
because msg.value will not be equal to 0 (which is entranceFee * newPlayers.length when newPlayers.length is 0).
This could lead to confusion for users or developers interacting with the contract, as the error message "PuppyRaffle: Must send enough to enter raffle" does not accurately describe the issue when newPlayers array is empty.
Manual review
Adding a require statement in the beginning of enterRaffle function to check if newPlayers array is not empty can fix this
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.