Title: Error: Call to undefined function wp_parse_url()
Last modified: February 6, 2024

---

# Error: Call to undefined function wp_parse_url()

 *  Resolved [webwitnl](https://wordpress.org/support/users/webwitnl/)
 * (@webwitnl)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/)
 * Hi, I found the following error various times in my php error log.
 * I cursory looked at it, wp_parse_url() is defined by wp-includes/http.php, which
   in turn is included by wp-settings.php, so my guess is this endpoint is light
   and basic and doesn’t include http.php.
 * [06-Feb-2024 10:39:21 UTC] PHP **Fatal** **error:**  Uncaught **Error**: Call
   to undefined function wp_parse_url() in /home/wildewolf/public_html/wp-includes/
   formatting.php:4527
 * Stack trace:
 * #0 /home/wildewolf/public_html/wp-includes/formatting.php(4620): esc_url(‘[https://www.wil…&#8217](https://www.wil…&#8217);,
   NULL, ‘db’)
 * #1 /home/wildewolf/public_html/wp-includes/formatting.php(4602): sanitize_url(‘
   [https://www.wil…&#8217](https://www.wil…&#8217);, NULL)
 * #2 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/tracking/tracking.
   php(244): esc_url_raw(‘[https://www.wil…&#8217](https://www.wil…&#8217);)
 * #3 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/tracking/tracking.
   php(56): burst_sanitize_entire_page_url(‘[https://www.wil…&#8217](https://www.wil…&#8217);)
 * #4 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/tracking/tracking.
   php(195): burst_track_hit(Array)
 * #5 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/endpoint.php(
   20): burst_beacon_track_hit()
 * #6 {main}

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Hessel de Jong](https://wordpress.org/support/users/hesseldejong/)
 * (@hesseldejong)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17402828)
 * Hi [@webwitnl](https://wordpress.org/support/users/webwitnl/),
 * Thanks for notifying us of this error. I have not seen it before, I will do some
   tests and get back to you.
 *  Plugin Author [Hessel de Jong](https://wordpress.org/support/users/hesseldejong/)
 * (@hesseldejong)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17424724)
 * Hi @webwit,
 * Which version are you on? We do not use wp_parse_url anywhere in the latest release.
   
   We do use parse_url, in the endpoint because we use WP short init, for faster
   requests.
 * Kind regards,
   Hessel
 *  Thread Starter [webwitnl](https://wordpress.org/support/users/webwitnl/)
 * (@webwitnl)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17424759)
 * Latest versions of everything.
 * Note that parse_url is not called by burst but by wp-includes/formatting.php.
 * See the trace #2, /wp-content/plugins/burst-statistics/tracking/tracking.php 
   calls esc_url_raw.
 *  Thread Starter [webwitnl](https://wordpress.org/support/users/webwitnl/)
 * (@webwitnl)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17430244)
 * So I took a look myself, wp_parse_url is called by esc_url in formatting.php 
   when the url contains a [ or ]. I logged the url when this is the case.
 * So if you go here:
   [https://www.wildewolf.nl/product-categorie/gezonde-hondensnacks/gedroogde-hondensnacks/](https://www.wildewolf.nl/product-categorie/gezonde-hondensnacks/gedroogde-hondensnacks/)
   And then select a filter on the left, you get such urls.
    -  This reply was modified 2 years, 3 months ago by [webwitnl](https://wordpress.org/support/users/webwitnl/).
 *  Plugin Author [Hessel de Jong](https://wordpress.org/support/users/hesseldejong/)
 * (@hesseldejong)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17437056)
 * Thanks a lot for figuring this out. I would’ve never figured that out by debugging,
   so much appreciated 🙂
 * I will look into a fix in the upcoming week. I will let you know, when the issue
   has been fixed and when it will be released.
 *  Plugin Author [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17471087)
 * [@webwitnl](https://wordpress.org/support/users/webwitnl/) apparently this function
   is not loaded when such a character is in the url, but it is loaded without it.
   Very strange.
 * I have created a fix for this:
    [https://github.com/Burst-Statistics/burst/tree/fix-missing-wp_parse_url](https://github.com/Burst-Statistics/burst/tree/fix-missing-wp_parse_url)
 * You can deactivate your current plugin, then download, and install the plugin
   from this branch.
 * This should resolve your issue. Let me know if this helps!
 *  Thread Starter [webwitnl](https://wordpress.org/support/users/webwitnl/)
 * (@webwitnl)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17491633)
 * Sorry for the late reply, seems to work well! Thanks for the fix.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error: Call to undefined function wp_parse_url()’ is closed to new replies.

 * ![](https://ps.w.org/burst-statistics/assets/icon-256x256.png?rev=2672964)
 * [Burst Statistics – Simple WordPress Analytics (Google Analytics Alternative)](https://wordpress.org/plugins/burst-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/burst-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/burst-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/burst-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/burst-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/burst-statistics/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [webwitnl](https://wordpress.org/support/users/webwitnl/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/error-call-to-undefined-function-wp_parse_url/#post-17491633)
 * Status: resolved