Skip to content

WP/CronInterval: make callback function name lookup case-insensitive#2730

Open
rodrigoprimo wants to merge 1 commit intodevelopfrom
fix-cron-interval
Open

WP/CronInterval: make callback function name lookup case-insensitive#2730
rodrigoprimo wants to merge 1 commit intodevelopfrom
fix-cron-interval

Conversation

@rodrigoprimo
Copy link
Copy Markdown
Contributor

Description

The WordPress.WP.CronInterval sniff was incorrectly treating callback function names as case-sensitive when trying to locate the callback function definition. This led to false positives when the callback reference case did not match the function declaration case.

The fix ensures callback names are compared case-insensitively using strcasecmp() when searching for function declarations in the code.

Suggested changelog entry

WordPress.WP.CronInterval: false positive when the callback function reference used different casing than the function declaration.

The sniff was incorrectly treating callback function names as case-sensitive when trying to locate the callback function definition. This led to false positives when the callback reference case did not match the function declaration case.

The fix ensures callback names are compared case-insensitively using `strcasecmp()` when searching for function declarations in the code.
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.

1 participant