Opened 5 years ago
Last modified 3 years ago
#53449 new defect (bug)
Child Walker classes change the $args parameter data type and default value signatures for start_el and end_el
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Menus | Keywords: | php80 |
| Focuses: | Cc: |
Description
The following Walker classes have code smells for changing the data type of the $args parameter when extending from the Walker::start_el and end_el:
Walker_Nav_MenuWalker_Nav_Menu_ChecklistWalker_Nav_Menu_Edit
What is the code smell? The parent defines the $args parameter as an array data type with a default value of an empty array. The child classes change the parameter's data type to stdClass with a default value of null.
These changes need investigation to determine if these changes are needed and why.
Note: See
TracTickets for help on using
tickets.
Some history here: [13802], [14031], [14248], [19679], [25643], [38559], [45537], [47189].
There appears to be a long-time confusion about the data type of
$argsin these classes, due to an inconsistency with other walkers which always use it as an array.