Skip to content

Commit 203886e

Browse files
committed
Merge remote-tracking branch 'tango-ce/MAGETWO-60100' into MAGETWO-60347
2 parents f33f923 + 4037a61 commit 203886e

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ public function testInitiatePasswordResetEmailReminder()
11461146

11471147
$storeId = 1;
11481148

1149-
mt_srand(mt_rand() + (100000000 * microtime()) % PHP_INT_MAX);
1149+
mt_srand(mt_rand() + (100000000 * (float)microtime()) % PHP_INT_MAX);
11501150
$hash = md5(uniqid(microtime() . mt_rand(0, mt_getrandmax()), true));
11511151

11521152
$this->emailNotificationMock->expects($this->once())
@@ -1168,7 +1168,7 @@ public function testInitiatePasswordResetEmailReset()
11681168
$templateIdentifier = 'Template Identifier';
11691169
$sender = 'Sender';
11701170

1171-
mt_srand(mt_rand() + (100000000 * microtime()) % PHP_INT_MAX);
1171+
mt_srand(mt_rand() + (100000000 * (float)microtime()) % PHP_INT_MAX);
11721172
$hash = md5(uniqid(microtime() . mt_rand(0, mt_getrandmax()), true));
11731173

11741174
$this->emailNotificationMock->expects($this->once())
@@ -1194,7 +1194,7 @@ public function testInitiatePasswordResetNoTemplate()
11941194
$templateIdentifier = 'Template Identifier';
11951195
$sender = 'Sender';
11961196

1197-
mt_srand(mt_rand() + (100000000 * microtime()) % PHP_INT_MAX);
1197+
mt_srand(mt_rand() + (100000000 * (float)microtime()) % PHP_INT_MAX);
11981198
$hash = md5(uniqid(microtime() . mt_rand(0, mt_getrandmax()), true));
11991199

12001200
$this->prepareInitiatePasswordReset($email, $templateIdentifier, $sender, $storeId, $customerId, $hash);

app/code/Magento/PageCache/Model/Config.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,17 @@ protected function _getReplacements()
148148
),
149149
'/* {{ ips }} */' => $this->_getAccessList(),
150150
'/* {{ design_exceptions_code }} */' => $this->_getDesignExceptions(),
151-
// http headers get transformed by php `X-Forwarded-Proto: https` becomes $SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'
151+
// http headers get transformed by php `X-Forwarded-Proto: https`
152+
// becomes $SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'
152153
// Apache and Nginx drop all headers with underlines by default.
153-
'/* {{ ssl_offloaded_header }} */' => str_replace('_', '-', $this->_scopeConfig->getValue(
154-
\Magento\Framework\HTTP\PhpEnvironment\Request::XML_PATH_OFFLOADER_HEADER,
155-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE))
156-
154+
'/* {{ ssl_offloaded_header }} */' => str_replace(
155+
'_',
156+
'-',
157+
$this->_scopeConfig->getValue(
158+
\Magento\Framework\HTTP\PhpEnvironment\Request::XML_PATH_OFFLOADER_HEADER,
159+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
160+
)
161+
)
157162
];
158163
}
159164

@@ -176,6 +181,7 @@ protected function _getAccessList()
176181
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
177182
);
178183
if (!empty($accessList)) {
184+
$result = [];
179185
$ips = explode(',', $accessList);
180186
foreach ($ips as $ip) {
181187
$result[] = sprintf($tpl, trim($ip));

0 commit comments

Comments
 (0)