Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sapi/apache2handler: function using char * to const char *. #14925

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

Merged
devnexen merged 1 commit into php:master from devnexen:sapi_apachehandler_upd
Jul 11, 2024

Conversation

Copy link
Member

@devnexen devnexen commented Jul 11, 2024

No description provided.

@devnexen devnexen marked this pull request as ready for review July 11, 2024 21:48
} else {
tmp1.s->val[0] = '0円';
}
if (!tmp1.s) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable addition

if ((p = strchr(s, '.'))) {
smart_str_appendl(&tmp1, s, (p - s));
} else {
smart_str_appends(&tmp1, s);
}
smart_str_appendc(&tmp1, ' ');
}
if (tmp1.s) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we now have a trailing ' '. Although this code looks dubious to begin with (len > 0 check but still setting index 0 🤔 ).

Copy link
Member Author

@devnexen devnexen Jul 11, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was unconditionally used regardless below for displaying

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, indeed, even more bizarre... That said, it's maybe best to keep the behaviour that strips the last ' '.

@devnexen devnexen force-pushed the sapi_apachehandler_upd branch from 370396a to 9e1090c Compare July 11, 2024 22:52
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally and it works, thanks

@devnexen devnexen merged commit 2463576 into php:master Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@nielsdos nielsdos nielsdos approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /