Skip to content

Remove main() from mysqli warning #10321

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
merged 1 commit into from
Jan 16, 2023

Conversation

kamil-tekiela
Copy link
Member

No description provided.

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

I'm wondering if there isn't an issue in get_active_function_name() for it to return main instead of the internal function. But that's maybe because it's part of the iterator?

@kamil-tekiela
Copy link
Member Author

Yes, it's because it's part of iterator. If the foreach loop is inside of another function, the message would actually contain the name of that function. But IMHO this is misleading. It's not the outer function that is causing the warning, but the iterator.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Until we fix this more generally. This is already an improvement.

@kamil-tekiela kamil-tekiela merged commit 38dfd20 into php:master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants