From 17d7828ac3eb7fa22988100cad7b2881afceea26 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Tue, 22 Sep 2020 10:59:06 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#1247 --- wire/core/WireInput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wire/core/WireInput.php b/wire/core/WireInput.php index 87124449..24a51800 100644 --- a/wire/core/WireInput.php +++ b/wire/core/WireInput.php @@ -572,7 +572,7 @@ class WireInput extends Wire { if($get < 0) { // retrieve from end - $get = abs($get); + $get = abs($get)-1; $urlSegments = array_reverse($this->urlSegments); return isset($urlSegments[$get]) ? $urlSegments[$get] : ''; }