Opened 7 years ago
Closed 7 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.3 |
| Component: | Upgrade/Install | Version: | 2.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
patch to fix potentially returning void in translate_level_to_role() in upgrade.php