From f7b8423b12c46f2cebeab338e910f1a5fe0e8af2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 5 Aug 2019 07:48:58 +0000 Subject: [PATCH] Upgrade/Install: Make sure `translate_level_to_role()` always returns a value. Props diddledan. Fixes #46848. Built from https://develop.svn.wordpress.org/trunk@45747 git-svn-id: http://core.svn.wordpress.org/trunk@45558 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/upgrade.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index c583fd2c04..281aa68b86 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -3171,6 +3171,7 @@ function translate_level_to_role( $level ) { case 1: return 'contributor'; case 0: + default: return 'subscriber'; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index d3946f06b7..296fdd4479 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45746'; +$wp_version = '5.3-alpha-45747'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.