mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-29 00:44:08 +01:00
Fixed missing type parameters for SQL bindValue calls
This commit is contained in:
parent
bac3fd1dfb
commit
852d0d6007
2 changed files with 6 additions and 6 deletions
|
@ -239,7 +239,7 @@ class Domains
|
|||
public function getDomainType(int $id) : string
|
||||
{
|
||||
$query = $this->db->prepare('SELECT type FROM domains WHERE id=:id');
|
||||
$query->bindValue(':id', $id);
|
||||
$query->bindValue(':id', $id, \PDO::PARAM_INT);
|
||||
$query->execute();
|
||||
$record = $query->fetch();
|
||||
|
||||
|
@ -268,8 +268,8 @@ class Domains
|
|||
}
|
||||
|
||||
$query = $this->db->prepare('UPDATE domains SET master=:master WHERE id=:id');
|
||||
$query->bindValue(':id', $id);
|
||||
$query->bindValue(':master', $master);
|
||||
$query->bindValue(':id', $id, \PDO::PARAM_INT);
|
||||
$query->bindValue(':master', $master, \PDO::PARAM_STR);
|
||||
$query->execute();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class Soa
|
|||
$this->db->beginTransaction();
|
||||
|
||||
$query = $this->db->prepare('SELECT id,name,type FROM domains WHERE id=:id');
|
||||
$query->bindValue(':id', $domainId);
|
||||
$query->bindValue(':id', $domainId, \PDO::PARAM_INT);
|
||||
$query->execute();
|
||||
$record = $query->fetch();
|
||||
|
||||
|
@ -71,7 +71,7 @@ class Soa
|
|||
];
|
||||
|
||||
$query = $this->db->prepare('SELECT content FROM records WHERE domain_id=:id AND type=\'SOA\'');
|
||||
$query->bindValue(':id', $domainId);
|
||||
$query->bindValue(':id', $domainId, \PDO::PARAM_INT);
|
||||
$query->execute();
|
||||
|
||||
$content = $query->fetch();
|
||||
|
@ -154,7 +154,7 @@ class Soa
|
|||
public function updateSerial(int $domainId) : void
|
||||
{
|
||||
$query = $this->db->prepare('SELECT content FROM records WHERE domain_id=:id AND type=\'SOA\'');
|
||||
$query->bindValue(':id', $domainId);
|
||||
$query->bindValue(':id', $domainId, \PDO::PARAM_INT);
|
||||
$query->execute();
|
||||
$content = $query->fetch();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue