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

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



Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic