Verification done? Try many + 6
This commit is contained in:
@@ -78,6 +78,21 @@ class EmailVerifier
|
|||||||
if (isset($parts['port'])) {
|
if (isset($parts['port'])) {
|
||||||
$request->server->set('SERVER_PORT', $parts['port']);
|
$request->server->set('SERVER_PORT', $parts['port']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force Request to re-calculate internal properties
|
||||||
|
$reflection = new \ReflectionObject($request);
|
||||||
|
foreach (['baseUrl', 'pathInfo', 'requestUri', 'method', 'format', 'session', 'locale', 'isHostValid', 'isForwardedValid'] as $propName) {
|
||||||
|
if ($reflection->hasProperty($propName)) {
|
||||||
|
$prop = $reflection->getProperty($propName);
|
||||||
|
$prop->setAccessible(true);
|
||||||
|
if ($propName === 'isHostValid' || $propName === 'isForwardedValid') {
|
||||||
|
$prop->setValue($request, true);
|
||||||
|
} else {
|
||||||
|
$prop->setValue($request, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($parts['path'])) {
|
if (isset($parts['path'])) {
|
||||||
$baseUrl = rtrim($parts['path'], '/');
|
$baseUrl = rtrim($parts['path'], '/');
|
||||||
$request->server->set('SCRIPT_NAME', $baseUrl . '/index.php');
|
$request->server->set('SCRIPT_NAME', $baseUrl . '/index.php');
|
||||||
@@ -89,8 +104,7 @@ class EmailVerifier
|
|||||||
$request->server->set('REQUEST_URI', $baseUrl . $requestUri);
|
$request->server->set('REQUEST_URI', $baseUrl . $requestUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force Request to re-calculate internal properties
|
// Force Request to re-calculate internal properties again after path changes
|
||||||
$reflection = new \ReflectionObject($request);
|
|
||||||
foreach (['baseUrl', 'pathInfo', 'requestUri'] as $propName) {
|
foreach (['baseUrl', 'pathInfo', 'requestUri'] as $propName) {
|
||||||
if ($reflection->hasProperty($propName)) {
|
if ($reflection->hasProperty($propName)) {
|
||||||
$prop = $reflection->getProperty($propName);
|
$prop = $reflection->getProperty($propName);
|
||||||
|
|||||||
Reference in New Issue
Block a user