[wp-trac] [WordPress Trac] #33277: Misleading comment for wp_get_attachment_link function
WordPress Trac
noreply at wordpress.org
Wed Aug 5 14:25:41 UTC 2015
#33277: Misleading comment for wp_get_attachment_link function
--------------------------+-----------------------------
Reporter: several27 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.2.3
Severity: normal | Keywords:
Focuses: docs |
--------------------------+-----------------------------
The comment for function '''wp_get_attachment_link''' inside ''wp-includes
/post-template.php'' says that the first argument can be either int or
WP_Post object, but that is not true.
This is the first line inside this function:
{{{
$id = intval($id);
}}}
This line will cause the error: Object of class WP_Post could not be
converted to int.
Please forgive me any mistakes this is my first ticket :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33277>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list