fix(ns): class_exists() must use FQCN after PSR-4
Bare class_exists('Balance') looks up global Balance, always false
under AKSRT\* namespaces → REST 403 on balance exchange and friends.
Rewrite string checks to AKSRT\{Domain}\{Class}.
This commit is contained in:
1 parent
d55d1c6b62
commit
68d2e78d77
40 files changed
+105
-105
No files matched your search
@@ -82,7 +82,7 @@ class SMSProviderAliyun implements ProviderInterface {
|
||||
* @return array|\WP_Error
|
||||
*/
|
||||
private function request(string $access_key, string $access_secret, string $region_id, array $biz_params) {
|
||||
if (!class_exists('SMSSignatureHelper')) {
|
||||
if (!class_exists('AKSRT\\Sms\\SMSSignatureHelper')) {
|
||||
return new \WP_Error('sms_helper_missing', '签名助手类未加载');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user