Be sure to cast the result and not a possibly undefined index that would send a notice

Ref: 490d731d6c

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-06-05 14:01:00 +02:00
parent 06df214332
commit 055a9bf3bc
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -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'])) {