Skip to content

Conversation

@rodrigoprimo
Copy link
Collaborator

While working on preparing WPCS for the changes in PHPCS 4.0, more specifically the changes around namespace tokenization, I noticed that the WordPress.DB.PreparedSQLPlaceholders sniff was not accounting for fully qualified calls to implode() in the code that checks for quotes in dynamically generated placeholders. This PR fixes that. See the modified test for an example of a code that would cause a false negative.

…n dynamic generated placeholders

The sniff was not accounting for fully qualified calls to `implode()` in the code that checks for quotes in dynamically generated placeholders.
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! LGTM.

@jrfnl jrfnl added this to the 3.2.x milestone Aug 8, 2025
@dingo-d dingo-d merged commit cc56685 into WordPress:develop Aug 8, 2025
41 checks passed
@rodrigoprimo rodrigoprimo deleted the prepared-sql-placeholders-false-negative branch August 8, 2025 11:46
@jrfnl jrfnl modified the milestones: 3.2.x, 3.3.0 Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants