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
@@ -260,7 +260,7 @@ class Shortcodes {
|
||||
* [aksrt_archive] 文章归档
|
||||
*/
|
||||
public function render_archive(array $atts = [], string $content = ''): string {
|
||||
if (!class_exists('Templates')) {
|
||||
if (!class_exists('AKSRT\\Core\\Templates')) {
|
||||
return '';
|
||||
}
|
||||
return Templates::get_instance()->render_archive_shortcode($atts, $content);
|
||||
@@ -270,7 +270,7 @@ class Shortcodes {
|
||||
* [aksrt_profile] 个人资料卡
|
||||
*/
|
||||
public function render_profile(array $atts = [], string $content = ''): string {
|
||||
if (!class_exists('Templates')) {
|
||||
if (!class_exists('AKSRT\\Core\\Templates')) {
|
||||
return '';
|
||||
}
|
||||
return Templates::get_instance()->render_profile_shortcode($atts, $content);
|
||||
|
||||
Reference in new issue
Block a user