Don't do this #1
Armando Ota

Armando Ota @armando_ota

About: Oldie goldie developers that's been around since ZX Spectrum 48K ;)

Location:
Ljubljana, Slovenia
Joined:
Aug 29, 2024

Don't do this #1

Publish Date: Jun 11
0 1

let this series be reminder to all of us what not to do and why not

#1: simple example

PHP Code using well known PHPMailer
function sendMail(...) {
...
$mail->send(); //DOUBLE PRETTY PLEASE WITH CREAM ON TOP GET RETURN VALUE
return true;
}

taken from PHPMailer API doc:
public send() : bool
Return values
bool — false on error - See the ErrorInfo property for details of the error

Lesson #1: read the API docs of what methods return
Lesson #2: handle error flows

Comments 1 total

  • Richard
    RichardJun 11, 2025

    Hi! unlock your awesome token airdrop in DuckyBSC airdrop tokens quick! — Act fast! Web3 wallet required to access airdrop. 👉 duckybsc.xyz

Add comment