php / php/php-src

zend_compile_implements() assumes that the class entry has no interfaces already

Đang mở
#22,354 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

@DanielEScherzer đang làm issue này rồi.

Từ ngày 17/6/2026.

  • #22355 của @DanielEScherzer — đang mở
Bug Category: Engine Status: Verified
Ngôn ngữ chính
C
Star
40.4k
Fork
8.2k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
103

Mô tả

Description

See https://github.com/php/php-src/blob/b0c78657949289c87d36eda5385d032294c40118/Zend/zend_compile.c#L8959-L8977

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

https://github.com/php/php-src/blob/b0c78657949289c87d36eda5385d032294c40118/Zend/zend_compile.c#L9110-L9116

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.