Index: src/wp-includes/kses.php
===================================================================
--- src/wp-includes/kses.php	(revision 53802)
+++ src/wp-includes/kses.php	(working copy)
@@ -36,6 +36,13 @@
  * Using `CUSTOM_TAGS` is not recommended and should be considered deprecated. The
  * {@see 'wp_kses_allowed_html'} filter is more powerful and supplies context.
  *
+ * When using this constant, make sure to set all of these globals to arrays:
+ *
+ *  - `$allowedposttags`
+ *  - `$allowedtags`
+ *  - `$allowedentitynames`
+ *  - `$allowedxmlentitynames`
+ *
  * @see wp_kses_allowed_html()
  * @since 1.2.0
  *
@@ -685,6 +692,28 @@
 
 	$allowedposttags = array_map( '_wp_add_global_attributes', $allowedposttags );
 } else {
+	$kses_globals = array(
+		'allowedposttags',
+		'allowedtags',
+		'allowedentitynames',
+		'allowedxmlentitynames',
+	);
+
+	foreach ( $kses_globals as $global_name ) {
+		if ( ! isset( $GLOBALS[ $global_name ] ) || ! is_array( $GLOBALS[ $global_name ] ) ) {
+			_doing_it_wrong(
+				'wp_kses_allowed_html',
+				sprintf(
+					/* translators: 1: CUSTOM_TAGS, 2: Global variable name. */
+					__( 'When using the %1$s constant, make sure to set the %2$s global to an array.' ),
+					'<code>CUSTOM_TAGS</code>',
+					'<code>$' . $global_name . '</code>'
+				),
+				'6.1.0'
+			);
+		}
+	}
+
 	$allowedtags     = wp_kses_array_lc( $allowedtags );
 	$allowedposttags = wp_kses_array_lc( $allowedposttags );
 }
