Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Zend/tests/gh20672.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--TEST--
GH-20672: Incorrect property_info sizing for locally shadowed trait properties
--CREDITS--
Jonne Ransijn (yyny)
--FILE--
<?php

trait T {
public static $a;
public static $b;
public static $c;
}

class Base {
public $x;
public $y;
}

class Child extends Base {
public static $a;
public static $b;
public static $c;
public static $d;

use T;
}

?>
Copy link
Member Author

@iluuu1994 iluuu1994 Mar 6, 2026

Choose a reason for hiding this comment

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

I forgot the ===DONE=== that are usually added to tests with no output. I'll do that before merging.

--EXPECT--
4 changes: 1 addition & 3 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -2933,9 +2933,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
ZSTR_VAL(prop_name),
ZSTR_VAL(ce->name));
}
if (!(flags & ZEND_ACC_STATIC)) {
continue;
}
continue;
}
}

Expand Down
Loading