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
|
b
|
class wpdb { |
3071 | 3071 | foreach ( $data as $col => $value ) { |
3072 | 3072 | if ( ! empty( $value['db'] ) ) { |
3073 | 3073 | // We're going to need to truncate by characters or bytes, depending on the length value we have. |
3074 | | if ( 'byte' === $value['length']['type'] ) { |
| 3074 | if ( isset( $value['length']['type'] ) && 'byte' === $value['length']['type'] ) { |
3075 | 3075 | // Using binary causes LEFT() to truncate by bytes. |
3076 | 3076 | $charset = 'binary'; |
3077 | 3077 | } else { |