tfm@europe.pub to Programmer Humor@programming.devEnglish · 17 hours agoTrue crimeeurope.pubimagemessage-square38linkfedilinkarrow-up1240arrow-down19
arrow-up1231arrow-down1imageTrue crimeeurope.pubtfm@europe.pub to Programmer Humor@programming.devEnglish · 17 hours agomessage-square38linkfedilink
minus-squarefoxglove (she/her)@lazysoci.allinkfedilinkEnglisharrow-up13·16 hours agoif it’s 'FILE_NOT_FOUND' then the string will be read as truthy and you will get 'User is admin' logged.
minus-squareBjörn Tantau@swg-empire.delinkfedilinkarrow-up24·15 hours agoAckshually three equal signs check for type as well. So mere truthiness is not enough. It has to be exactly true. Also, everyone knows FILE_NOT_FOUND isn’t a string but a boolean value.
if it’s
'FILE_NOT_FOUND'
then the string will be read as truthy and you will get'User is admin'
logged.Ackshually three equal signs check for type as well. So mere truthiness is not enough. It has to be exactly true.
Also, everyone knows FILE_NOT_FOUND isn’t a string but a boolean value.