Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 13 months ago

#63174 closed defect (bug) (invalid)

PHP Warning: Undefined array key 0 in .../wp-includes/meta.php on line 651

Reported by: wpSight Owned by:
Priority: normal Milestone:
Component: General Version: 6.9
Severity: trivial Keywords:
Cc: Focuses:

Description

I have WordPress 6.8-beta3-60069 with PHP 8.3 installed.

When I use get_post_meta() with a not existing beta key for the current post the warning

Warning: Undefined array key 0 in wp-includes\meta.php on line 651

appears.

This messages is realted to return $check[0];
$check is an array, but empty. Thats why the key [0] does not exist.

You can check with a random request

$duration = get_post_meta( $post_id, 'random_key', true );

Change History (2)

#1 @wpSight
18 months ago

  • Resolutioninvalid
  • Severity normaltrivial
  • Status newclosed

No need to check. Issue is related to a third-party product which manipulates the meta key.

#2 @peterwilsoncc
13 months ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.