Skip to content

Commit

Permalink
fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
svfcode committed Dec 28, 2024
1 parent ab9ec4e commit 10e0fcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Cleantalk/ApbctWP/RemoteCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,14 @@ public static function action__debug() // phpcs:ignore PSR1.Methods.CamelCapsMet
{
global $apbct, $wpdb;

$out = array();

if (Get::get('run_send_feedback') === '1') {
$out['send_feedback'] = array('result' => ct_send_feedback() ? 'true' : 'false');
}

$sfw_table_name = !empty($apbct->data['sfw_common_table_name']) ? $apbct->data['sfw_common_table_name'] : APBCT_TBL_FIREWALL_DATA;

$out = array();
$out['sfw_data_base_size'] = $wpdb->get_var('SELECT COUNT(*) FROM ' . $sfw_table_name);
$out['stats'] = $apbct->stats;
$out['settings'] = self::getSettings($apbct->settings);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cleantalk/ApbctWP/RestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function register_routes() // phpcs:ignore PSR1.Methods.CamelCapsMethodNa
'methods' => 'POST',
'callback' => array(\Cleantalk\ApbctWP\Antispam\ForceProtection::getInstance(), 'checkBot'),
'permission_callback' => function (WP_REST_Request $request) {
return wp_verify_nonce($request->get_header('x_wp_nonce'), 'wp_rest');
return wp_verify_nonce(TT::toString($request->get_header('x_wp_nonce')), 'wp_rest');
},
'args' => array(
'event_javascript_data' => array(
Expand Down

0 comments on commit 10e0fcf

Please sign in to comment.