Ticket #4246 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

link-manager.php - invalid variable (typo)

Reported by: charismabiz Assigned to: anonymous
Priority: normal Milestone: 2.2
Component: Administration Version: 2.1.2
Severity: normal Keywords:
Cc: charismabiz

Description

Wordpress Version: WordPress 2.1.2 (also checked that 2.1.3 has the same bug)
Problem File: wp-admin/link-manager.php
Problem Line: Line 183
Problem: The variable $id is not defined (ie: var_dump($id)=NULL). Based on preceding code and documentation in Codex about how it's supposed to work, I think it should be $link->link_id
Reason for fixing: Required for those who are making plugins relating to the blogroll administration. Also, why leave a typo like that in?

Original Code (Line 183):
<td><?php do_action('manage_link_custom_column', $column_name, $id); ?></td>

Proposed solution (Line 183):
<td><?php do_action('manage_link_custom_column', $column_name, $link->link_id); ?></td>

Error is confirmed to appear on (it should appear always, since it's a code flaw/typo):
WordPress 2.1.2
Windows NT 5.1 build 2600
Apache/2.2.4 (Win32) (API Version: 20051115)
PHP Version 5.2.1
mySQL 5.0.37
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Attachments

link-manager_original_.php (7.4 kB) - added by charismabiz on 05/10/07 19:05:06.
Original file with bug
link-manager_fix_.php (7.4 kB) - added by charismabiz on 05/10/07 19:05:54.
File with fix (only line 183 changed)

Change History

05/10/07 19:05:06 changed by charismabiz

  • attachment link-manager_original_.php added.

Original file with bug

05/10/07 19:05:54 changed by charismabiz

  • attachment link-manager_fix_.php added.

File with fix (only line 183 changed)

05/10/07 21:07:51 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [5434]) Use correct var. Props charismabiz. fixes #4246 for 2.2

05/10/07 21:08:13 changed by ryan

(In [5435]) Use correct var. Props charismabiz. fixes #4246 for 2.3

05/11/07 01:59:09 changed by foolswisdom

  • milestone changed from 2.4 to 2.2.