cancel
Showing results for 
Search instead for 
Did you mean: 

1.9.2 Error in Mage_Core_Model_Store - secure url will never be detected

1.9.2 Error in Mage_Core_Model_Store - secure url will never be detected

@@ -773,10 +773,10 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract
             if (!$secureBaseUrl) {
                 return false;
             }
-
-            $uri = Zend_Uri::factory($secureBaseUrl);
-            $port = $uri->getPort();
-            $isSecure = ($uri->getScheme() == 'https')
+            $urlParts = parse_url($secureBaseUrl);
+            $scheme   = isset($urlParts['scheme']) ? ':' . $urlParts['scheme'] : '';
+            $port     = isset($urlParts['port']) ? ':' . $urlParts['port'] : '';
+            $isSecure = ($scheme == 'https')
                 && isset($_SERVER['SERVER_PORT'])
                 && ($port == $_SERVER['SERVER_PORT']);
             return $isSecure;

if scheme is set then $scheme will have : in front so $isSecure will always be false.

1 REPLY 1

Re: 1.9.2 Error in Mage_Core_Model_Store - secure url will never be detected

Hello,

it´s hard to see that in Version 1.9.3 there is no Solution for this Problem...