Skip to content

[BUG] Array to string conversion in SuspiciousActivityCheck.php #107

Open

Description

@bandtank

Value this delivers

Reporting a bug

What happened

I enabled GuardCore for EspoCRM, which uses this library, and the following log statements appeared:

[2026-10-31 18:13:36.635113] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.638554] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.638740] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.641795] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.643069] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.642539] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.644339] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.640723] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.644462] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.644535] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.644654] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.645079] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}
[2026-10-31 18:13:36.643787] WARNING: E_WARNING: Array to string conversion {"code":2,"message":"Array to string conversion","file":"/var/www/crm/custom/Espo/Modules/GuardCore/vendor/rennf93/guard-core-php/src/Pipeline/Checks/SuspiciousActivityCheck.php","line":310}

Steps to reproduce

I enabled the Guard Core extension in EspoCRM using the configuration below. Nothing else was implemented or changed. I visited the Calendar in EspoCRM and the statements appeared in the log.

Versions

Guard Core 1.0.0, PHP 8.5.12, Ubuntu 26.04

Configuration

'guard' => [
      'enableRedis' => true,
      'redisUrl' => 'redis://127.0.0.1:6379',
      'redisPrefix' => 'ext-GuardCore:',
      'trustedProxies' => [],
      'routes' => [],
  ],

Additional context

No response

Activity

  1. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor

    Thanks for opening your first issue on guard-core-php!

    To help us triage quickly, please make sure your report includes:

    • A clear reproduction (a short PHP snippet or failing test runner output is ideal)
    • Output of php -v (the engine supports PHP 8.2, 8.3, and 8.4) and your composer.json platform requirements
    • The engine version you depend on (pin a commit until the first tag) and your composer.json requires
    • Redis configuration if relevant (guard-core-php uses Redis for distributed bans, rate limiting, and cloud IP ranges)

    A few pointers:

    • Scan README.md and the docs site for usage guidance.
    • Security vulnerability? Do not open a public issue - please use GitHub's private vulnerability reporting.

    Thanks again - a maintainer will be with you soon.

  2. rennf93 commented on Oct 31, 2026

    @rennf93
    Member

    Hey @bandtank, thanks, reproduced. Query parameters nested more than one level (like EspoCRM's where[0][value]) aren't handled as nested values, which is what throws that warning. The fix goes into the next engine release and the extension picks it up from there. I'll keep this open until it ships.

  3. self-assigned this
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugConfirmed defect

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions