fix: address code review feedback on billing admin fixes
- menu.php: remove unnecessary @ suppression from mysqli_thread_id() (instanceof check already guarantees a mysqli object) - adminserverlist.php: split ternary flash message into separate if/else for readability; replace dynamic SQL fragment with explicit if/else query branches Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/988997ed-7568-48bf-96ef-889fb5d91fec Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
bb77620796
commit
f4f222953f
2 changed files with 15 additions and 6 deletions
|
|
@ -56,8 +56,9 @@ if ($is_logged_in) {
|
|||
$menu_db = null;
|
||||
$menu_db_opened = false;
|
||||
// Only reuse $db if it is still an open (non-closed) connection.
|
||||
// mysqli_thread_id() returns 0 on a closed handle, so guard against that.
|
||||
if (isset($db) && $db instanceof mysqli && @mysqli_thread_id($db)) {
|
||||
// mysqli_thread_id() returns 0 on a closed handle; no @ needed since instanceof
|
||||
// already guarantees $db is a mysqli object.
|
||||
if (isset($db) && $db instanceof mysqli && mysqli_thread_id($db)) {
|
||||
$menu_db = $db;
|
||||
} else {
|
||||
$menu_db_port = isset($db_port) ? (int)$db_port : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue