Opened 6 years ago
Closed 5 years ago
#46848 closed defect (bug) (fixed)
translate_level_to_role may return void in wp-admin/includes/upgrade.php
Reported by: | diddledani | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
The function translate_level_to_role()
is defined and used in wp-admin/includes/upgrade.php
in the function upgrade_160
. The usage requires that the function return a string or numeric to be used in a subsequent array key. The function may return void which cannot be used as a key. For correctness the function should always return a value. Patch attached adds a default
selector to the switch
statement to achieve this.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
patch to fix potentially returning void in translate_level_to_role() in upgrade.php