diff --git a/Sources/PersonalMessage.php b/Sources/PersonalMessage.php index 78178400a7..d7193aa4c0 100644 --- a/Sources/PersonalMessage.php +++ b/Sources/PersonalMessage.php @@ -3810,7 +3810,7 @@ function ManageRules() foreach ($_POST['acttype'] as $ind => $type) { // Picking a valid label? - if ($type == 'lab' && (!isset($_POST['labdef'][$ind]) || !isset($context['labels'][$_POST['labdef'][$ind]]))) + if ($type == 'lab' && (!ctype_digit((string) $ind) || !isset($_POST['labdef'][$ind]) || !isset($context['labels'][$_POST['labdef'][$ind]]))) continue; // Record what we're doing.