Undefined index error using $_SERVER['HTTPS']
<p>Debug is throwing...</p>

<blockquote>
  <p>Notice: Undefined index: HTTPS in
  C:\xampplite\htdocs\testsite\wp-content\themes\mytheme\header.php
  on line 4</p>
</blockquote>

<p>How can I change my function below to prevent the error?</p>

<pre><code>function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 }
</code></pre>

<p>Would this be the equivalent?</p>

<pre><code>if ( isset( $_SERVER["HTTPS"] )) {$pageURL .= "s";}
</code></pre>
