Commit f75ae84
authored
Preserve class-name case in ReflectionClass::getProperty() (#22272)
When given a "Class::property" argument, getProperty() lowercased the
class part before looking it up, so the "Class ... does not exist"
exception printed the lowercased name and autoloaders received it in
lowercase, breaking case-sensitive (PSR-4) autoloaders.
Pass the class name to zend_lookup_class() as given - it lowercases
internally for the class-table lookup - matching what ReflectionMethod
and ReflectionProperty already do.1 parent 9e9b309 commit f75ae84
5 files changed
Lines changed: 9 additions & 7 deletions
File tree
- ext/reflection
- tests
- tests/classes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4734 | 4734 | | |
4735 | 4735 | | |
4736 | 4736 | | |
4737 | | - | |
4738 | | - | |
4739 | | - | |
| 4737 | + | |
4740 | 4738 | | |
4741 | 4739 | | |
4742 | 4740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
0 commit comments