Opened 11 years ago
Closed 11 years ago
#25116 closed defect (bug) (fixed)
edit_tag_link() calls edit_term_link() with params out of order
Reported by: | pbiron | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Template | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
I think edit_tag_link()
calls edit_term_link()
with parameters out of order.
On line 669, edit_tag_link()
calls edit_term_link()
like so
$link = edit_term_link( $link, '', '', false, $tag );
but I believe that call should have the last 2 params reversed, as in
$link = edit_term_link( $link, '', '', $tag, false );
since the signature for edit_term_link()
is (on line 715)
edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true )
(i.e., with the term/tag as the 4th param and the boolean echo as the 5th).
Can anyone else verify that this is, indeed, a bug? I believe it is since calling edit_tag_link()
as is results in the following error messages:
Notice: Trying to get property of non-object in \wp-includes\link-template.php on line 720 Notice: Trying to get property of non-object in \wp-includes\link-template.php on line 721 Notice: Trying to get property of non-object in \wp-includes\link-template.php on line 721
but reversing the order of the last 2 params in the call to edit_term_link()
results in the expected output (and no error messages).
As far as I can tell, this bug has existed since v3.1.
Attachments (1)
Change History (4)
#1
@
11 years ago
- Keywords 2nd-opinion removed
- Milestone changed from Awaiting Review to 3.7
- Version changed from 3.6 to 3.1
Introduced in [15792].
Note: See
TracTickets for help on using
tickets.
patch to \wp-includes\link-templates.php