We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 表现 问题的具体描述 NSURL (QMUI) 文件中 qmui_queryItems 参数的指定返回值类型为 (NSDictionary<NSString *, NSString *> *) 但是.30行的 [params setObject:obj.value ?: [NSNull null] forKey:obj.name] 中.obj.value 如果为空.则会赋值 NSNull 会触发swift 中对参数类型的强制校验.引发崩溃. 控制台提示: Could not cast value of type 'NSNull' (0x2076dbeb8) to 'NSString' (0x2076d8e30).
截图 Bug 现场的界面截图,或者 Xcode 控制台的错误信息截图,有问题的代码截图 如何重现 let url = NSURL.init(string: "https://www.baidu.com?key") debugPrint(url?.qmui_queryItems) swift 项目 直接调用以上代码即可
预期的表现 正常情况下,应该是什么表现
其他信息
The text was updated successfully, but these errors were encountered:
感谢指出,下个版本会修复,在此之前请将本地代码改为:
[params setObject:obj.value ?: @"" forKey:obj.name];
Sorry, something went wrong.
下个版本有发布计划吗
近期暂无大版本,小版本如果需要的话可以两周内发一个。
已发布 4.5.0 修复该问题。
No branches or pull requests
Bug 表现
问题的具体描述
NSURL (QMUI) 文件中
qmui_queryItems 参数的指定返回值类型为 (NSDictionary<NSString *, NSString *> *)
但是.30行的 [params setObject:obj.value ?: [NSNull null] forKey:obj.name] 中.obj.value 如果为空.则会赋值 NSNull
会触发swift 中对参数类型的强制校验.引发崩溃.
控制台提示:
Could not cast value of type 'NSNull' (0x2076dbeb8) to 'NSString' (0x2076d8e30).
截图
Bug 现场的界面截图,或者 Xcode 控制台的错误信息截图,有问题的代码截图
如何重现
let url = NSURL.init(string: "https://www.baidu.com?key")
debugPrint(url?.qmui_queryItems)
swift 项目 直接调用以上代码即可
预期的表现
正常情况下,应该是什么表现
其他信息
The text was updated successfully, but these errors were encountered: