Repository navigation
Clean up sprintf invalid arg type warnings found by phpstan-strict-rules - #1673
Merged
Merged
Conversation
Caught by phpstan-strict-rules's sprintf checks. I guess nobody has been editing team icons or avatars!
Unfortunately this wouldn't catch the previous swapped sql args bug,
because `sprintf("... WHERE id=%d", $str) produces "WHERE id=0" which
is valid sql, but not a valid team ID.
Nonetheless, we are now exercising this code path.
...to make phpstan-strict-rules happy.
This code seems highly suspicious to me, and looks like it might be achieving the right effect in the wrong way, but I don't want to look at it right now, so leave some breadcrumbs for future-Brian, and preserve the existing behaviour.
bpfoley
force-pushed
the
strict-sprintf
branch
from
October 5, 2026 15:14
cd3e7ae to
655e239
Compare
cpeel
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Including one pair of bugs.