Title: [Plugin: WordPress.com Stats] HTTPS undefined
Last modified: August 19, 2016

---

# [Plugin: WordPress.com Stats] HTTPS undefined

 *  [teetilldeath](https://wordpress.org/support/users/teetilldeath/)
 * (@teetilldeath)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-stats-https-undefined/)
 * Notice: Undefined index: HTTPS in /home/BLAH/wp-content/plugins/stats/stats.php
   on line 111
 * This line of code dumps the above error message to my sites.
 * `$http = $_SERVER['HTTPS'] ? 'https' : 'http';`
 * I had to go around and manually change the line to
 * `$http = isset($_SERVER['HTTPS']) ? 'https' : 'http';`
 * Because of this note on [http://www.php.net/manual/en/reserved.variables.server.php](http://www.php.net/manual/en/reserved.variables.server.php)
 *  [b]Note: Note that when using ISAPI with IIS, the value will be [i]off[/i if
   the request was not made through the HTTPS protocol.[/b]
 * And I’m obviously not the only one with this issue as you can see from this google
   result.
 * [http://www.google.com/search?q=%22Notice%3A+Undefined+index%3A+HTTPS%22+%22line+111%22](http://www.google.com/search?q=%22Notice%3A+Undefined+index%3A+HTTPS%22+%22line+111%22)
 * Just an FYI for future development. Love the product, by the way!
 * Peace
 * [http://wordpress.org/extend/plugins/stats/](http://wordpress.org/extend/plugins/stats/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [teetilldeath](https://wordpress.org/support/users/teetilldeath/)
 * (@teetilldeath)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-stats-https-undefined/#post-1683680)
 * Wow, a new version was released that did not include the above code fix? C’mon
   guys, now I have to update your plugin on every one of my pages again…
 *  Plugin Author [Andy Skelton](https://wordpress.org/support/users/andy/)
 * (@andy)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-stats-https-undefined/#post-1683681)
 * Sorry, I missed this until now.
 * [http://plugins.trac.wordpress.org/changeset/297292](http://plugins.trac.wordpress.org/changeset/297292)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WordPress.com Stats] HTTPS undefined’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/stats.svg)
 * [WordPress.com Stats](https://wordpress.org/plugins/stats/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stats/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stats/)
 * [Active Topics](https://wordpress.org/support/plugin/stats/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stats/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stats/reviews/)

## Tags

 * [Stats](https://wordpress.org/support/topic-tag/stats/)

 * 2 replies
 * 2 participants
 * Last reply from: [Andy Skelton](https://wordpress.org/support/users/andy/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-stats-https-undefined/#post-1683681)
 * Status: not resolved