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

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