Blimey: Acker is being of some use! He threw me this code last night, and asked what to make of it (well, OK, Sean asked me, but still).
found something unexpected:What the actual f*ck?
a = isnull(request) && isnull(server) && isnull(form) && isnull(url) && isnull(33);
a =true... meaning all are null
So I knocked together some test code to make things more clear:
// acker.cfm
areAllNull = isnull(request) && isnull(server) && isnull(form) && isnull(url) && isNull({}) && isnull(33);
writeOutput("
isnull(request): #isnull(request)#<br>
isnull(server): #isnull(server)#<br>
isnull(form): #isnull(form)#<br>
isnull(url): #isnull(url)#<br>
isnull(33): #isnull(33)#<br>
isNull({}): #isNull({})#<br>
areAllNull: #areAllNull#<br>
");
And on ColdFusion, this yields:
isnull(request): YES
isnull(server): YES
isnull(form): YES
isnull(url): YES
isnull(33): YES
isNull({}): NO
areAllNull: NO
Adobe you dicks. How can an entire scope be null? How can 33 be null??? I looked in the docs ("
IsNull()") and that didn't say anything like "oh, we just make sh!t up about what's null or not. To be honest we just don't know. I mean... how can one actually tell? What is null, anyhow?", which might explain it. But no.Lucee are not lunatics:
isnull(request): false
isnull(server): false
isnull(form): false
isnull(url): false
isnull(33): false
isNull({}): false
areAllNull: false
I despair, Adobe. I really do. Chris Blackwell could not have put this better:
@DAC_dev that's phenomenal. Adobe should extend their boolean type to 'true / false / fuck knows'— Chris Blackwell (@d1rtym0nk3y) July 30, 2015
Raised as bug 4028246.
Update:
Just an update on this. In a moment reminiscent of the Orwellian position that 2+2=5, Adobe had this to say on the topic of the nullness of 33:Are you having a f***ing laugh, mate?
And now these're something about Elvis to investigate too...
--
Adam
