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:
2026-07-17 15:40:20 +08:00
parent d55d1c6b62
commit 68d2e78d77
40 changed files with 105 additions and 105 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ class ResourceMetaBox {
$gallery = $this->parse_json_array($_POST['aksrt_pay_gallery'] ?? '');
// 清洗下载源
if ($downloads !== null && class_exists('Setup') && method_exists('Setup', 'sanitize_downloads_meta')) {
if ($downloads !== null && class_exists('AKSRT\\Core\\Setup') && method_exists('AKSRT\\Core\\Setup', 'sanitize_downloads_meta')) {
$downloads = Setup::sanitize_downloads_meta($downloads);
}