Fixed some variable referencing errors

This commit is contained in:
Lukas Metzger 2018-04-01 16:11:47 +02:00
parent 02f8e48f11
commit c00263e072
2 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ class Records
$this->logger->debug('User tries to add record for invalid domain.');
return $res->withJson(['error' => 'The domain does not exist or is neighter MASTER nor NATIVE.'], 404);
} catch (\Exceptions\SemanticException $e) {
$this->logger->debug('User tries to add record with invalid type.', ['type' => $type]);
$this->logger->debug('User tries to add record with invalid type.', ['type' => $body['type']]);
return $res->withJson(['error' => 'The provided type is invalid.'], 400);
}
}
@ -118,7 +118,7 @@ class Records
$this->logger->debug('Get record info', ['id' => $recordId]);
return $res->withJson($result, 200);
} catch (\Exceptions\NotFoundException $e) {
return $res->withJson(['error' => 'No record found for id ' . $domainId], 404);
return $res->withJson(['error' => 'No record found for id ' . $recordId], 404);
}
}

View file

@ -143,7 +143,7 @@ class Credentials
}
$query = $this->db->prepare('DELETE FROM remote WHERE id=:id');
$query->bindValue(':id', $id, \PDO::PARAM_INT);
$query->bindValue(':id', $credentialId, \PDO::PARAM_INT);
$query->execute();
$this->db->commit();