WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#5106 closed defect (bug) (wontfix)

MagpieRSS rss.php debug function is called out of scope

Reported by: foolswisdom Owned by:
Milestone: Priority: low
Severity: minor Version: 2.3
Component: General Keywords:
Focuses: Cc:

Description

MagpieRSS rss.php debug function is called out of scope

ENV: WordPress 2.3 +r6177

Repro: Always

  1. At ~ line 870 of rss.php set MAGPIE_DEBUG 2
  2. Add a sidebar feed widget

ACTUAL RESULT
Fatal error: Call to undefined function debug() in /var/www/wp/trunk/wp-includes/rss.php on line 466

EXPECTED RESULT
Debug output.

ADDITIONAL DETAILS
Function debug is part of RSSCache, and should be invoked as such. Though not sure where it and some other functions aren't static.

Not that it is likely that that RSSCache needs debugging, but I was lazy and was just going to use it in that file when I was investigating a different problem.

Attachments (1)

5106.diff (524 bytes) - added by Otto42 7 years ago.
debug fix

Download all attachments as: .zip

Change History (5)

comment:1 Otto427 years ago

  • Keywords has-patch added

Looks like debug wasn't supposed to be part of RSSCache to me. Try this patch on for size, see if it fixes the issue.

Otto427 years ago

debug fix

comment:2 foolswisdom7 years ago

  • Keywords has-patch removed

Otto42, thanks for taking a shot at fixing this.

Looking at your patch I don't think it will work. function debug contains:

{{$this->error("MagpieRSS [debug] $debugmsg", $lvl); }}

What is this? Surprised that passed your testing of the patch.

I think the debug function is specific to debugging the RSSCache, and otherwise a generic name like 'debug' is awkward.

comment:3 sivel5 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

We have now switched to SimplePie.

comment:4 jacobsantos5 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.