Skip to content

Commit

Permalink
Fix. Remote calls. Debug RC fatal error fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glomberg committed Dec 20, 2024
1 parent f80a071 commit b295162
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/CleantalkSP/SpbctWP/RemoteCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,15 @@ public static function action__debug() // phpcs:ignore PSR1.Methods.CamelCapsMet
$out['settings'] = $spbc->settings;
$out['fw_stats'] = $spbc->fw_stats;
$out['data'] = $spbc->data;
$logs = array();
foreach (Repository::getAll() as $record) {
if (!empty($record['content']) && is_string($record['content']) && !empty($record['timestamp']) && strpos($record['content'], 'OK') === false) {
$logs[date('Y-m-d H:i:s', $record['timestamp'])] = ': ' . $record['content'];
}
}
$out['last_scan_log'] = array_reverse($logs);
if ( $logs && is_array($logs) ) {
$out['last_scan_log'] = array_reverse($logs);
}
$out['cron'] = $spbc->cron;
$out['errors'] = $spbc->errors;
$out['debug'] = $spbc->debug;
Expand Down

0 comments on commit b295162

Please sign in to comment.