tfm@europe.pub to Programmer Humor@programming.devEnglish · 16 hours agoTrue crimeeurope.pubimagemessage-square38linkfedilinkarrow-up1238arrow-down19
arrow-up1229arrow-down1imageTrue crimeeurope.pubtfm@europe.pub to Programmer Humor@programming.devEnglish · 16 hours agomessage-square38linkfedilink
minus-squarejbrains@sh.itjust.workslinkfedilinkarrow-up10·16 hours agoWhat if role is FILE_NOT_FOUND?!
minus-squarefoxglove (she/her)@lazysoci.allinkfedilinkEnglisharrow-up13·15 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.
What if
role
isFILE_NOT_FOUND
?!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.