diff options
author | AndreaChirulescu <andrea.chirulescu@gmail.com> | 2021-04-21 21:37:09 +0200 |
---|---|---|
committer | AndreaChirulescu <andrea.chirulescu@gmail.com> | 2021-04-21 21:37:09 +0200 |
commit | f29cb92957df4423396af64fdcce08ca2b630457 (patch) | |
tree | 20760c9f16813e79618001f78a35df8a55be3747 | |
parent | 2260ddc0d4e7b5a9f1a9ac0995e7a98403bcf658 (diff) | |
download | gigologadmin-f29cb92957df4423396af64fdcce08ca2b630457.tar.gz gigologadmin-f29cb92957df4423396af64fdcce08ca2b630457.tar.bz2 gigologadmin-f29cb92957df4423396af64fdcce08ca2b630457.zip |
added check that GiglogAdmin_Band::get_band returns something
-rw-r--r-- | includes/admin/views/giglog_admin_page.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index a195fba..548694b 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -181,10 +181,20 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $content.='</form>'; + $band = ''; + $bcountry = ''; + $b = GiglogAdmin_Band::get_band($c->band()); + if (is_array($b)) + { + $band = GiglogAdmin_Band::get_band($c->band())[0]; + $bcountry = GiglogAdmin_AdminPage::get_countries(GiglogAdmin_Band::get_band($c->band())[1]); + } + + $content.='<form method="POST" action="" class="bandedit" ><br>' - .'<input type="hidden" name="bid" value="' .$c->band(). '" />' - .'<label for="bandname">Band Name:</label><input type="text" id="bandname" name="bandname" value="'.GiglogAdmin_Band::get_band($c->band())[0].'"><br>' - .'<label for="eventurl">Band Country:</label>'.GiglogAdmin_AdminPage::get_countries(GiglogAdmin_Band::get_band($c->band())[1]).'<br>'; + .'<input type="hidden" name="bid" value="' .$c->band(). '" />' + .'<label for="bandname">Band Name:</label><input type="text" id="bandname" name="bandname" value="'.$band.'"><br>' + .'<label for="eventurl">Band Country:</label>'.$bcountry.'<br>'; if ($editing) { $content.='<p><input type="submit" name="editband" value="Edit Band"></p>'; |