Browse Source

see #575 - fix "Warning: Declaration of ...::init($id): bool should be compatabile with ... ::init(string $id): bool"

issue-916
David Goodwin 5 years ago
parent
commit
ede15de662
  1. 2
      model/AdminpasswordHandler.php
  2. 2
      model/AliasdomainHandler.php
  3. 2
      model/MailboxHandler.php
  4. 2
      model/VacationHandler.php

2
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");

2
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) {

2
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;
}

2
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');
}

Loading…
Cancel
Save