Skip to content

Commit

Permalink
fix(formanswer): use of undefined variables
Browse files Browse the repository at this point in the history
some link fixes
  • Loading branch information
btry committed Sep 9, 2019
1 parent f05f2de commit 363366f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ protected function showMyLastForms() {
* @return Null Nothing, just display the form
*/
public function displayUserForm() {
global $CFG_GLPI, $DB;
global $CFG_GLPI;

if (isset($_SESSION['formcreator']['data'])) {
$data = $_SESSION['formcreator']['data'];
Expand Down
4 changes: 2 additions & 2 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ private function createIssue() {
$itemTicket->getFromDB($result['id']);
$ticket = new Ticket();
if (!$ticket->getFromDB($itemTicket->fields['tickets_id'])) {
throw new RuntimeException('Formcreator: Missing ticket ' . $itemTicket->fields['tickets_id'] . ' for formanswer ' . $formanswers_id);
throw new RuntimeException('Formcreator: Missing ticket ' . $itemTicket->fields['tickets_id'] . ' for formanswer ' . $this->getID());
}
$ticketId = $ticket->getID();
$issue->add([
Expand Down Expand Up @@ -1306,7 +1306,7 @@ private function updateIssue() {
$itemTicket->getFromDB($result['id']);
$ticket = new Ticket();
if (!$ticket->getFromDB($itemTicket->fields['tickets_id'])) {
throw new RuntimeException('Formcreator: Missing ticket ' . $itemTicket->fields['tickets_id'] . ' for formanswer ' . $formanswers_id);
throw new RuntimeException('Formcreator: Missing ticket ' . $itemTicket->fields['tickets_id'] . ' for formanswer ' . $this->getID());
}
$ticketId = $ticket->getID();
$issue->getFromDBByCrit([
Expand Down
2 changes: 1 addition & 1 deletion tests/suite-unit/PluginFormcreatorFormAnswer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testGetFullForm() {
]);

$instance = $this->newTestedInstance();
$formAnswerId = $instance->add([
$instance->add([
\PluginFormcreatorForm::getForeignKeyField() => $form->getID(),
'formcreator_field_' . $question->getID() => ''
]);
Expand Down

0 comments on commit 363366f

Please sign in to comment.