-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] Only use sprintf instead of sprintf and string concat #39412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Q | A |
---|---|
Branch? | 5.x |
Bug fix? | no |
New feature? | no |
Deprecations? | no |
Tickets | --- |
License | MIT |
Doc PR | --- |
@@ -24,7 +24,7 @@ public function __construct(string $message, string $dsn = null, ?\Throwable $pr | |||
{ | |||
$this->dsn = $dsn; | |||
if ($dsn) { | |||
$message = sprintf('Invalid "%s" notifier DSN: ', $dsn).$message; | |||
$message = sprintf('Invalid "%s" notifier DSN: %s', $dsn, $message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was on purpose, because fabbot used to scream at %s
that are not surrounded by double quotes.
Not sure why it doesn't scream anymore at these.
This should be double checked before merging!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I can answer myself ...:P
this is not in a throw
expression, that's why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a CS change, it should be on 5.1 to prevent issues with merges.
another possibility is to reject it.
@@ -24,7 +24,7 @@ public function __construct(string $message, string $dsn = null, ?\Throwable $pr | |||
{ | |||
$this->dsn = $dsn; | |||
if ($dsn) { | |||
$message = sprintf('Invalid "%s" notifier DSN: ', $dsn).$message; | |||
$message = sprintf('Invalid "%s" notifier DSN: %s', $dsn, $message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I can answer myself ...:P
this is not in a throw
expression, that's why.
Ok |
69ca323
to
ca65c54
Compare
Thank you @OskarStark. |