DEV Community

Discussion on: Can you find the bug in this piece of php code? 🤹

Collapse
aswierc profile image
Artur Świerc

$user->getPin() can be nullable? If yes, then the condition will be true even when I put there an empty string.

Collapse
nombrekeff profile image
Keff Author

Hey there! It actually can't be bull, it will always be a string of n-length.