fix(logger): 修正 7 處 Logger::error 參數不足導致的 TypeError(A10)
TMDO_Logger::error() 簽章為 (module, hook, message, context, zone),但 7 處 以 (event, array) 兩參數呼叫 → array 傳給 string $hook 觸發 TypeError: - 4 個 stress tester 的 batch 失敗路徑 - auto-promoter 的 promote 失敗路徑 - conflict-detector 的欄位衝突路徑 - hook-bus 的 shadow 比對例外路徑(shadow_read 模式必炸) 同時 backport A v3.3.x 的 mass column clear opt-in gate(A9): delete_all=true 改由 wpdo_allow_mass_column_clear / tmdo_allow_mass_column_clear filter 明確放行,取代原本「>500 列才擋」的啟發式(小站一次誤呼叫即整欄 NULL)。 註:A 對應處 class-wpdo-hook-bus.php:511,522 傳 3 個 string 給 Logger::warning(string,array),A 側自身有 TypeError,故未照搬其寫法。 unit 379 / integration 398 GREEN Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -545,7 +545,7 @@ final class TMDO_Post_Stress_Tester {
|
||||
$state['completed_at'] = time();
|
||||
update_option( self::OPT_STATE, $state, false );
|
||||
if ( class_exists( 'TMDO_Logger' ) ) {
|
||||
TMDO_Logger::error( 'post_stress_test_batch_failed', array( 'message' => $e->getMessage() ) );
|
||||
TMDO_Logger::error( 'stress_test', 'post_batch_failed', $e->getMessage() );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user