PHP Fatal error: Call to undefined function url()

robb - January 30, 2009 - 01:48
Project:FeedBurner
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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();

#1

Dave Reid - January 31, 2009 - 15:54

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

#2

Dave Reid - February 19, 2009 - 20:44

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

#3

Dave Reid - March 21, 2009 - 13:59
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

System Message - April 4, 2009 - 14:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.