WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#29654 closed defect (bug) (worksforme)

A bug in get_post_meta

Reported by: muhammadfarhanatif Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Options, Meta APIs Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Respected Sir,
I hope you are fine & doing great!
First of all congratulation for given us wordpress 4.0 with great new features.
Currently I am facing issue due to wordpress 4.0 get_post_meta function.
It is not working fine at my end like this

$meta_values = get_post_meta( $post_id, $key, $single );

But it is working fine after this bit of changing in code

$meta_values = get_post_meta( "$post_id", $key, $single );

So please let me know where are the issue.I mean issue in wordpress 4.0 or in codex documentation.
I hope you will understand my point.
Thanks & best Regards
Muhammad Farhan Atif

Change History (2)

#1 @SergeyBiryukov
5 years ago

  • Description modified (diff)
  • Keywords reporter-feedback added

Could you provide a piece of code to reproduce the issue on a clean install?

$post_id should be an integer, changing it to a numeric string doesn't make any sense.

I'd suggest trying the support forums for troubleshooting, until the exact bug is identified and confirmed.

#2 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

No feedback in 4 months.

Note: See TracTickets for help on using tickets.