Opened 2 months ago
Closed 2 months ago
#63174 closed defect (bug) (invalid)
PHP Warning: Undefined array key 0 in .../wp-includes/meta.php on line 651
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | trivial | Version: | trunk |
Component: | General | Keywords: | |
Focuses: | Cc: |
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 (1)
Note: See
TracTickets for help on using
tickets.
No need to check. Issue is related to a third-party product which manipulates the meta key.