Download & Extend

PHP Fatal error: Call to undefined function url()

Project:FeedBurner
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If with replace all links checked is checked then a fatal error is generated for all cached pages. This does not cause any ill effects for me, except pollute my error logs. The following patch seeks to fix that in a non-intrusive way.

On cached pages the HOOK_exit code in feedburner calls url(), which does not exist. This patch checks for 'url' being present. Seemed a quick easy way to solve the problem.

--- base/feedburner/feedburner.module 2009-01-02 23:34:11.000000000 -0800
+++ patches/feedburner/feedburner.module 2009-01-29 17:41:50.000000000 -0800
@@ -122,7 +122,7 @@
*/
function feedburner_exit() {
// Replace any links to original feed URLs with their FeedBurner equivalents.
- if (feedburner_var('replace_html') && ob_get_level()) {
+ if (feedburner_var('replace_html') && ob_get_level() && function_exists('url')) {
// Get the current output and clean the output buffer.
$data = ob_get_contents();
ob_end_clean();

Comments

#1

Hmm...that's weird. On cached pages this code shouldn't be executing. I'll investigate.

#2

Arg...this experimental feed replacement was kind of a disaster. I'm debating just scrapping it completely.

#3

Status:needs review» fixed

For now, this code has been disabled until I can find a more reliable way to have this feature. Marking as fixed and opening up a separate postponed issue for rewriting feed URLs.

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.