Your project uses non-strict array lookups 3

More information: https://insight.symfony.com/what-we-analyse/php.strict_array_lookup

  1. // Extract statement type
  2. $stmt_type = strtoupper(trim(explode(' ', $sql)[0]));
  3. // Whitelist allowed SQL types
  4. if (!in_array($stmt_type, $allowed_statements)) {
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by clicshopping
  5. $CLICSHOPPING_MessageStack->add('Restore skipped: unsupported SQL statement type (' . $stmt_type . ')', 'warning');
  6. continue;
  7. }
  8. // Validate DROP TABLE statements to prevent SQL injection
  1. }
  2. // Optional: Whitelist specific domains (e.g., GitHub)
  3. // Uncomment and modify as needed:
  4. $allowed_domains = ['github.com', 'api.github.com'];
  5. if (!in_array($parsed_url['host'] ?? '', $allowed_domains)) {
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by clicshopping
  6. $this->messageStack->add('Download from unauthorized domain', 'error');
  7. CLICSHOPPING::redirect('Upgrade&Marketplace');
  8. return null;
  9. }
  1. $flags['session_id'] = false;
  2. }
  3. // Security: Validate method against whitelist
  4. $allowed_methods = ['post', 'get'];
  5. $safe_method = in_array(strtolower($method ?? 'post'), $allowed_methods) ? strtolower($method ?? 'post') : 'post';
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by clicshopping
  6. // Security: Sanitize form action URL
  7. $safe_action = static::sanitizeUrl($action);
  8. $form = '<form name="' . static::outputProtected($name) . '" action="' . $safe_action . '" method="' . $safe_method . '"';

Your project should not contain PHP files defining multiple classes 2

More information: https://insight.symfony.com/what-we-analyse/php.file_contains_more_than_one_class

This file contains 4 classes. Keeping only one class per file is a standard in the PHP community, since it promotes interoperability and maintainability.
Collective
  • McpException (defined at line 18)
  • McpConnectionException (defined at line 27)
  • McpProtocolException (defined at line 36)
  • McpConfigurationException (defined at line 45)
This file contains 2 classes. Keeping only one class per file is a standard in the PHP community, since it promotes interoperability and maintainability.
Time to fix: about 4 hours
Read doc Open Issue Permalink Copy Prompt
Collective
  • he_header_multi_template (defined at line 14)
  • explodeCategoryTree (defined at line 235)