Commit
This commit is contained in:
parent
de74589b88
commit
83a647cc26
@ -80,7 +80,7 @@ class Team
|
||||
|
||||
public function setPhone(int $phone): Self
|
||||
{
|
||||
if ($this->longerThan($phone, 32))
|
||||
if ($this->longerThan((string)$phone, 32))
|
||||
{
|
||||
throw new InvalidArgumentException("Phone number is too long!");
|
||||
}
|
||||
@ -90,7 +90,7 @@ class Team
|
||||
|
||||
public function setParticipants(int $participants): Self
|
||||
{
|
||||
if ($this->longerThan($participants, 32))
|
||||
if ($this->longerThan((string)$participants, 32))
|
||||
{
|
||||
throw new InvalidArgumentException("Participants is too long!");
|
||||
}
|
||||
@ -100,7 +100,7 @@ class Team
|
||||
|
||||
public function setRounds(int $rounds): Self
|
||||
{
|
||||
if ($this->longerThan($rounds, 32))
|
||||
if ($this->longerThan((string)$rounds, 32))
|
||||
{
|
||||
throw new InvalidArgumentException("Rounds is too long!");
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ $item = filter_input(INPUT_GET, 'item', FILTER_VALIDATE_INT);
|
||||
|
||||
$model = $app->model('Teamtable');
|
||||
|
||||
$team;
|
||||
if ($item !== NULL)
|
||||
{
|
||||
$team = $model->get($item);
|
||||
@ -61,8 +62,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
||||
if ($item !== NULL)
|
||||
{
|
||||
// team exists
|
||||
$team = $model->get($item);
|
||||
|
||||
$title = "Endre lag";
|
||||
$app->view('template/header', [
|
||||
'title' => $title
|
||||
|
Reference in New Issue
Block a user