Ticket #5106 (new defect)

Opened 8 months ago

Last modified 8 months ago

MagpieRSS rss.php debug function is called out of scope

Reported by: foolswisdom Assigned to: anonymous
Priority: low Milestone: 2.6
Component: General Version: 2.3
Severity: minor Keywords:
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

5106.diff (0.5 kB) - added by Otto42 on 09/30/07 02:31:33.
debug fix

Change History

09/30/07 02:31:17 changed by Otto42

  • keywords set to has-patch.

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.

09/30/07 02:31:33 changed by Otto42

  • attachment 5106.diff added.

debug fix

10/01/07 00:33:22 changed by foolswisdom

  • keywords deleted.

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.