| @@ -246,8 +246,16 @@ | ||
| 246 | 246 | if ($this->collect_performance_data()) { |
| 247 | 247 | return; |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | + // Not-configured is a configuration state, not a failure: it is the | |
| 251 | + // default for a fresh install, it never resolves on its own, and the | |
| 252 | + // REST layer already reports it to the UI. Logging it wrote a line to | |
| 253 | + // every unconfigured site's error log on every scheduled run (#585). | |
| 254 | + if ($this->last_error_code === self::ERROR_NOT_CONFIGURED) { | |
| 255 | + return; | |
| 256 | + } | |
| 257 | + | |
| 250 | 258 | error_log( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- the only record that a silent cron failure happened. |
| 251 | 259 | sprintf( |
| 252 | 260 | 'ThinkRank [performance]: scheduled Core Web Vitals collection failed (%s) — %s', |
| 253 | 261 | $this->last_error_code !== '' ? $this->last_error_code : 'unknown', |