From 62f6907bfa5ae42abcf57eda4e14fc6b4c54cfe2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 5 Aug 2019 07:47:43 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/upgrade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index c583fd2c04..281aa68b86 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -3171,6 +3171,7 @@ function translate_level_to_role( $level ) { case 1: return 'contributor'; case 0: + default: return 'subscriber'; } }