From cb916179919facc26e846d493d2287caeb1a340b Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Mon, 15 Jul 2019 01:13:21 +0200
Subject: [PATCH] PHP 7.4/array-access: Fix get_metadata()
---
src/wp-includes/meta.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
index 5446c16d3e..9bd989540c 100644
a
|
b
|
function get_metadata( $meta_type, $object_id, $meta_key = '', $single = false ) |
523 | 523 | |
524 | 524 | if ( ! $meta_cache ) { |
525 | 525 | $meta_cache = update_meta_cache( $meta_type, array( $object_id ) ); |
526 | | $meta_cache = $meta_cache[ $object_id ]; |
| 526 | if ( isset( $meta_cache[ $object_id ] ) ) { |
| 527 | $meta_cache = $meta_cache[ $object_id ]; |
| 528 | } else { |
| 529 | $meta_cache = null; |
| 530 | } |
527 | 531 | } |
528 | 532 | |
529 | 533 | if ( ! $meta_key ) { |