zend_compile_implements() assumes that the class entry has no interfaces already
Open
Bug
Category: Engine
Status: Verified
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
If an attribute validator added an interface to the class, it gets silently dropped and triggers leaks, because class attributes are compiled before implements, see
Discovered while working on https://github.com/DanielEScherzer/CustomCast, not sure if I noticed this earlier and just didn't report it but it has been there for a while
PHP Version
8.4+
Operating System
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.