From 871a0b3a87c05f3a11e93765e778f5dd4980aa9b Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Mon, 15 Jul 2019 03:00:16 +0200
Subject: [PATCH] PHP 7.4/array-access: Fix wpdb::strip_invalid_text()

---
 src/wp-includes/wp-db.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
index 46851b14fb..559e3b6d2c 100644
--- a/src/wp-includes/wp-db.php
+++ b/src/wp-includes/wp-db.php
@@ -3071,7 +3071,7 @@ class wpdb {
 			foreach ( $data as $col => $value ) {
 				if ( ! empty( $value['db'] ) ) {
 					// We're going to need to truncate by characters or bytes, depending on the length value we have.
-					if ( 'byte' === $value['length']['type'] ) {
+					if ( isset( $value['length']['type'] ) && 'byte' === $value['length']['type'] ) {
 						// Using binary causes LEFT() to truncate by bytes.
 						$charset = 'binary';
 					} else {
-- 
2.21.0.windows.1

