From e90ad9756e709d173d6c1a52dcffcedc809749a2 Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Wed, 21 Apr 2021 20:04:39 +0200 Subject: Added check if emty concert when fetching assigned user --- includes/admin/views/giglog_admin_page.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 9a59289..5662047 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -485,7 +485,8 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { global $wpdb; $hf_user = wp_get_current_user(); $hf_username = $hf_user->user_login; - + if (!empty($c)) + { //PHOTO1 if ($p1 == 'photo1') { @@ -551,6 +552,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { return ('
'); } + } } } } -- cgit v1.2.3 From 2260ddc0d4e7b5a9f1a9ac0995e7a98403bcf658 Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Wed, 21 Apr 2021 20:08:40 +0200 Subject: Added an else to return something when concert is empty on return user function --- includes/admin/views/giglog_admin_page.php | 1 + 1 file changed, 1 insertion(+) (limited to 'includes') diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 5662047..a195fba 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -553,6 +553,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { '); } } + else return ('no concert selected'); } } } -- cgit v1.2.3