Skip to content

Tidy debug call in wp_cache_get_postid_from_comment()#1052

Merged
donnchawp merged 2 commits into
trunkfrom
fix/phpcs-single-quotes-comment-debug
May 27, 2026
Merged

Tidy debug call in wp_cache_get_postid_from_comment()#1052
donnchawp merged 2 commits into
trunkfrom
fix/phpcs-single-quotes-comment-debug

Conversation

@donnchawp
Copy link
Copy Markdown
Contributor

@donnchawp donnchawp commented May 27, 2026

Two small cleanups to the wp_cache_debug() call added in #1043:

  1. Single quotes — phpcs (changed-lines lint) flagged the double-quoted string; it has no interpolation, so single quotes are correct.
  2. Drop vestigial level argumentwp_cache_debug( $message, $level = 1 ) declares $level but never uses it in the function body, so the trailing 4 did nothing.

Net: wp_cache_debug( 'Comment not found; skipping cache update.' );

donnchawp added 2 commits May 27, 2026 17:38
phpcs (changed-lines) flagged the double-quoted string added in #1043; it has no interpolation, so single quotes are correct.
wp_cache_debug()'s $level parameter (line 722) is declared but never used in the function body. Remove the unused '4' argument from this call.
@donnchawp donnchawp changed the title Use single quotes for non-interpolated debug string Tidy debug call in wp_cache_get_postid_from_comment() May 27, 2026
@donnchawp donnchawp merged commit 63e2a8a into trunk May 27, 2026
6 checks passed
@donnchawp donnchawp deleted the fix/phpcs-single-quotes-comment-debug branch May 27, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant