Skip to content

BUG: Plugin logs SQL queries when WP_DEBUG_LOG = false #545

Description

@alebedev80

Plugin logs SQL queries when WP_DEBUG_LOG = false

Issue

The plugin is logging SQL queries to the error log even when WP_DEBUG_LOG is set to false.

Expected behavior

When WP_DEBUG_LOG = false, no debug information should be logged.

Current behavior

SQL queries are being logged on every request:

SELECT 0 AS is_personal, 1 AS is_ip, status, country_code, network, mask
FROM wp_spbc_firewall_data_v4
WHERE network IN (3288334336,3321888768,3322413056,3322675200,3322707968,3322724352,3322732544,3322736640,3322737664,3322738176,3322738240,3322738272,3322738276,3322738278)
    AND network = 3322738278 & mask
    AND country_code = "0"
) UNION ...

Stack trace:

made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, {closure}, spbc_firewall__check, CleantalkSP\Security\Firewall->run, CleantalkSP\SpbctWP\Firewall\FW->check, CleantalkSP\SpbctWP\Firewall\FW->ipv4GetResultsFromDb, CleantalkSP\SpbctWP\DB->fetchAll

Request

Please disable error logging when WP_DEBUG_LOG = false.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions