WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Google Analytics for WordPress] Multiple notices from ga_get_domain when running on localho

[Plugin: Google Analytics for WordPress] Multiple notices from ga_get_domain when running on localho

  • 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/

  • The topic ‘[Plugin: Google Analytics for WordPress] Multiple notices from ga_get_domain when running on localho’ is closed to new replies.