From c81ced91d25f24b8340187364404a325f7dab30a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 18 Jun 2022 21:01:36 +0200 Subject: Get rid of a few deprecation warning. I think the remaining deprecation warnings now are from WordPress itself. --- includes/concert.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'includes/concert.php') diff --git a/includes/concert.php b/includes/concert.php index fed48a5..2849dba 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -333,15 +333,15 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) { /** * Return database id for concert. */ - public function id() { - return $this->id; + public function id() : int { + return $this->id ? $this->id : 0; } /** * Return the concert "name". */ - public function cname() { - return $this->cname; + public function cname() : string { + return $this->cname ? $this->cname : ''; } /** @@ -355,27 +355,27 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) { * Return the date of the concert. */ public function cdate() { - return $this->cdate; + return $this->cdate ? $this->cdate : ''; } /** * Return the ticket url for the concert. */ public function tickets() { - return $this->tickets; + return $this->tickets ? $this->tickets : ''; } /** * Return the event link for the concert. */ public function eventlink() { - return $this->eventlink; + return $this->eventlink ? $this->eventlink : ''; } /** * Return the status of the concert. */ - public function status() { + public function status() : int { return $this->status; } @@ -394,7 +394,7 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) { * @return array */ public function roles() : array { - return $this->roles; + return $this->roles ? $this->roles : array(); } /** -- cgit v1.2.3