Skip to content

Fix some misleading comments about __clone() never being executed #15926

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
Sep 16, 2024

Conversation

DanielEScherzer
Copy link
Member

For the Exception, ReflectionClass, and ReflectionAttribute classes, the __clone() method is declared to be private, and the implementation has a comment that it should never be executed. However, the implementation can be executed by using a ReflectionMethod. Fix the comments to instead explain why the implementation is needed.

[skip ci]

For the `Exception`, `ReflectionClass`, and `ReflectionAttribute` classes, the
`__clone()` method is declared to be private, and the implementation has a
comment that it should never be executed. However, the implementation can be
executed by using a `ReflectionMethod`. Fix the comments to instead explain why
the implementation is needed.

[skip ci]
@iluuu1994 iluuu1994 merged commit 65b4f22 into php:master Sep 16, 2024
2 checks passed
@iluuu1994
Copy link
Member

Thanks!

@DanielEScherzer DanielEScherzer deleted the clone-reachable branch September 17, 2024 00:24
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.

2 participants