Opened 13 years ago
Closed 13 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Template | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
patch to \wp-includes\link-templates.php