Skip to content

Commit

Permalink
fix(targetticket): set location may fail
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Dec 4, 2023
1 parent 1b141a3 commit 75144be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,10 @@ protected function setTargetLocation($data, $formanswer) {
'plugin_formcreator_questions_id' => $this->fields['location_question']
]
])->current();
if (isset($location['answer']) && ctype_digit($location['answer'])) {
if (isset($location['answer']) && !Location::isNewID($location['answer'])) {
$location = $location['answer'];
} else {
$location = null;
}
break;
case self::LOCATION_RULE_SPECIFIC:
Expand Down

0 comments on commit 75144be

Please sign in to comment.