【发布时间】:2013-01-08 13:46:30
【问题描述】:
我在经典 ASP 页面中有以下 VBScript:
function getMagicLink(fromWhere, provider)
dim url
url = "magic.asp?fromwhere=" & fromWhere
If Not provider is Nothing Then ' Error occurs here
url = url & "&provider=" & provider
End if
getMagicLink = "<a target='_blank' href='" & url & "'>" & number & "</a>"
end function
我不断在If Not provider Is Nothing Then 的行上收到“需要对象”错误消息。
值要么是NULL,要么不是NULL,为什么会出现这个错误?
编辑: 当我调用对象时,我传入 NULL,或者传入一个字符串。
【问题讨论】:
标签: asp-classic vbscript null nullreferenceexception nothing