From 230c876aa64f391b43c78cdec23dd7db1778cc8b Mon Sep 17 00:00:00 2001 From: "CORP\\phedor" Date: Thu, 15 Feb 2018 11:59:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B3=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BE=D0=BF=D1=82=D0=B8=D0=BC=D0=B8=D0=B7=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=83=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Path.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Path.php b/src/Path.php index 1a74881..24b6575 100644 --- a/src/Path.php +++ b/src/Path.php @@ -143,7 +143,9 @@ class Path case "": break; case ".": break; case "..": - if (count($result) > 0) { array_pop($result); break; } + if (count($result) > 0 && $result[count($result) - 1] != '..') { + array_pop($result); break; + } default: array_push($result, $n); }