WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Multiple notices from ga_get_domain when running on localho (1 post)

  1. michielvoo
    Member
    Posted 1 year ago #

    We run WordPress on localhost during development, and I noticed that with WP_DEBUG set to true (always a good idea when developing) the plugin generates warnings because it assumes that it will match a domain name regular expression in the function ga_get_domain.

    But the regex fails to match localhost:25898, and so PHP will notice that:

    Notice: Undefined offset: 0 in ...\wp-content\plugins\google-analytics-for-wordpress\googleanalytics.php on line 1129

    It would be best if ga_get_domain could check to see that $matches is not empty before returning.

    Thanks!

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic