Ready to get started?Download WordPress


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

  1. michielvoo
    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.



Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic