WordPress.org

Forums

Google Analytics by Yoast
[Plugin: Google Analytics for WordPress] Multiple notices from ga_get_domain when running on localho (1 post)

  1. michielvoo
    Member
    Posted 2 years 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

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic