fix: 更新器改用唯一类名 WPSlug_Updater;发版 1.2.1 #43

Merged
feibisi merged 1 commit from release/1.2.1 into main 2026-07-28 00:04:05 +08:00
Owner

消除同名全局类致命冲突;同时修正 main 上遗留的 release: v1.0.0-test 提交导致的版本头倒退(1.2.0 -> 1.0.0-test),改为 1.2.1。

消除同名全局类致命冲突;同时修正 main 上遗留的 release: v1.0.0-test 提交导致的版本头倒退(1.2.0 -> 1.0.0-test),改为 1.2.1。
fix: 更新器改用唯一类名 WPSlug_Updater;发版 1.2.1
Some checks failed
Release Plugin / release (push) Has been cancelled
gitleaks 密钥泄露扫描 / gitleaks (pull_request) Successful in -52s
安全扫描 / security-scan (pull_request) Successful in -52s
WordPress 插件 CI / ci (pull_request) Failing after 11m7s
08b70318f9
22 个文派插件各自捆绑一份 includes/class-wenpai-updater.php,都声明同一个
全局类 WenPai_Updater。文件顶部的 class_exists() + return 守卫并不是安全的
条件声明写法,在特定 opcache 缓存态下会被绕过,导致:

  Fatal error: Cannot declare class WenPai_Updater, because the name is
  already in use in .../includes/class-wenpai-updater.php on line 27

已在客户站实测复现(文派云桥 + WPCY Template Connector 同装,wp-admin 全 500)。
本插件 1.2.0 与云桥 1.2.2 同装存在同样风险。

改为 WPSlug_Updater 后不再占用共享类名。附带修掉一个静默问题:改之前全站
只可能存在一个 WenPai_Updater 实例(先加载者赢),各插件会用到别的插件
捆绑的更新器版本;现在各用自己的。

同时把版本推进到 1.2.1 发布此修复。

Co-Authored-By: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WenPai-org/wpslug!43
No description provided.