-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Cast float/char to int to avoid invalid scalar argument warning #22288
Cast float/char to int to avoid invalid scalar argument warning #22288
Conversation
Signed-off-by: Morris Jobke <[email protected]>
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 31932: failureacceptance-app-files
Show full log
|
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.
sure
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.
@@ -1211,7 +1211,7 @@ function imagebmp($im, $fileName = '', $bit = 24, $compression = 0) { | |||
} // RLE8 | |||
elseif ($compression == 1 && $bit == 8) { | |||
for ($j = $height - 1; $j >= 0; $j--) { | |||
$lastIndex = "\0"; | |||
$lastIndex = 0; |
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.
It read it should be null
instead. This can change the result of the condition in 1218, where it would match black (if I understand it correctly).
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.
True point. And chr(null)
also doesn't print a warning instead of chr("\0")
.
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.
…s black Ref #22288 Signed-off-by: Morris Jobke <[email protected]>
Found by Psalm.
The
$lastIndex
one is basically the same before and in this way even makes more sense. Other approach would be to wrap the"\0"
into anord()
to get the0
from that.