Skip to content

Commit 5309058

Browse files
author
Hai Zheng
committed
Formatter correction.
1 parent 2859829 commit 5309058

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/esi.cls.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,10 @@ private function _register_esi_actions()
283283
if (!empty($_SERVER['ESI_REFERER']) && !$this->cls('REST')->is_rest($_SERVER['ESI_REFERER'])) {
284284
self::debug('overwrite REQUEST_URI to ESI_REFERER [from] ' . $_SERVER['REQUEST_URI'] . ' [to] ' . $_SERVER['ESI_REFERER']);
285285
if (!empty($_SERVER['ESI_REFERER'])) {
286-
$_SERVER['REQUEST_URI'] =
287-
substr(get_option('permalink_structure'), -1) === '/' && strpos($_SERVER['ESI_REFERER'], '?') === false
288-
? trailingslashit($_SERVER['ESI_REFERER'])
289-
: $_SERVER['ESI_REFERER'];
286+
$_SERVER['REQUEST_URI'] = $_SERVER['ESI_REFERER'];
287+
if (substr(get_option('permalink_structure'), -1) === '/' && strpos($_SERVER['ESI_REFERER'], '?') === false) {
288+
$_SERVER['REQUEST_URI'] = trailingslashit($_SERVER['ESI_REFERER']);
289+
}
290290
}
291291
# Prevent from 301 redirecting
292292
if (!empty($_SERVER['SCRIPT_URI'])) {

0 commit comments

Comments
 (0)