Upgrade/Install: Make sure translate_level_to_role() always returns a value.

Props diddledan.
Fixes #46848.

git-svn-id: https://develop.svn.wordpress.org/trunk@45747 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-08-05 07:47:43 +00:00
parent 89c1d393b2
commit 62f6907bfa

View File

@ -3171,6 +3171,7 @@ function translate_level_to_role( $level ) {
case 1: case 1:
return 'contributor'; return 'contributor';
case 0: case 0:
default:
return 'subscriber'; return 'subscriber';
} }
} }