From ede15de662e2fcfb49deaf8d66dd6cb0c4c91f6e Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 16 Dec 2021 20:54:01 +0000 Subject: [PATCH] see #575 - fix "Warning: Declaration of ...::init($id): bool should be compatabile with ... ::init(string $id): bool" --- model/AdminpasswordHandler.php | 2 +- model/AliasdomainHandler.php | 2 +- model/MailboxHandler.php | 2 +- model/VacationHandler.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/model/AdminpasswordHandler.php b/model/AdminpasswordHandler.php index f81ccaf0..96e92d1b 100644 --- a/model/AdminpasswordHandler.php +++ b/model/AdminpasswordHandler.php @@ -35,7 +35,7 @@ class AdminpasswordHandler extends PFAHandler { ); } - public function init($id) :bool { + public function init(string $id) :bool { # hardcode to logged in admin if ($this->admin_username == '') { die("No admin logged in"); diff --git a/model/AliasdomainHandler.php b/model/AliasdomainHandler.php index 5b419632..50c4c321 100644 --- a/model/AliasdomainHandler.php +++ b/model/AliasdomainHandler.php @@ -51,7 +51,7 @@ class AliasdomainHandler extends PFAHandler { } } - public function init($id) : bool { + public function init(string $id) : bool { $success = parent::init($id); if ($success) { if (count($this->struct['alias_domain']['options']) == 0 && $this->new) { diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 0fea63e8..9e74f72f 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -60,7 +60,7 @@ class MailboxHandler extends PFAHandler { } } - public function init($id) : bool { + public function init(string $id) : bool { if (!parent::init($id)) { return false; } diff --git a/model/VacationHandler.php b/model/VacationHandler.php index b3c69676..82a705ea 100644 --- a/model/VacationHandler.php +++ b/model/VacationHandler.php @@ -18,7 +18,7 @@ class VacationHandler extends PFAHandler { */ protected $domain_field = 'domain'; - public function init($id) : bool { + public function init(string $id) : bool { throw new \Exception('VacationHandler is not yet ready to be used with *Handler methods'); }