From 055a9bf3bce565dad5ad1f878c59d2d12f8b8068 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 5 Jun 2020 14:01:00 +0200 Subject: [PATCH] Be sure to cast the result and not a possibly undefined index that would send a notice Ref: 490d731d6c5ccbd1967ae0db7ac26194eb8f995a Signed-off-by: William Desportes --- libraries/classes/Navigation/NavigationTree.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/classes/Navigation/NavigationTree.php b/libraries/classes/Navigation/NavigationTree.php index 5301899ef8..979354b929 100644 --- a/libraries/classes/Navigation/NavigationTree.php +++ b/libraries/classes/Navigation/NavigationTree.php @@ -147,10 +147,10 @@ class NavigationTree if (isset($_REQUEST['aPath'])) { $this->aPath[0] = $this->parsePath($_REQUEST['aPath']); $this->pos2Name[0] = $_REQUEST['pos2_name'] ?? ''; - $this->pos2Value[0] = (int) $_REQUEST['pos2_value'] ?? 0; + $this->pos2Value[0] = (int) ($_REQUEST['pos2_value'] ?? 0); if (isset($_REQUEST['pos3_name'])) { $this->pos3Name[0] = $_REQUEST['pos3_name'] ?? ''; - $this->pos3Value[0] = (int) $_REQUEST['pos3_value'] ?? 0; + $this->pos3Value[0] = (int) ($_REQUEST['pos3_value'] ?? 0); } } else { if (isset($_POST['n0_aPath'])) {