]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Shut up some errors main
authorValerie Pond <redacted>
Thu, 22 Aug 2024 21:28:12 +0000 (05:28 +0800)
committerValerie Pond <redacted>
Thu, 22 Aug 2024 21:28:12 +0000 (05:28 +0800)
fixes #52

misc/server-lookup-misc.php
misc/user-lookup-misc.php
settings/general.php

index 2538ea672b80b8423b1d7bc1c96453f47e1e917d..4d7a4a9f43bf74fc6b3d29256fa80a861a96a415 100644 (file)
@@ -363,7 +363,7 @@ function generate_html_extserverinfo($server)
                     <table>
                         <tr>
                             <th>Cert Fingerprint</th>
-                            <td><?php echo "<span class=\"badge rounded-pill badge-info\">".htmlspecialchars($server->tls->certfp)."</span>"; ?></td>
+                            <td><?php echo (isset($server->tls->certfp) ? "<span class=\"badge rounded-pill badge-info\">".htmlspecialchars($server->tls->certfp). "</span>" : "none"); ?></td>
                         </tr><tr>
                             <th>TLS Cipher</th>
                             <td><?php echo "<span class=\"badge rounded-pill badge-info\">".htmlspecialchars($server->tls->cipher)."</span>"; ?></td>
index cb6a4a730a2ee98e9a094822f22c2ca29223d018..2383b9221de918d82f3038aba415abf32caee7bb 100644 (file)
@@ -40,7 +40,7 @@ function generate_html_whois($user)
                        </tr><tr>
                                <th>IP</th>
                                <td colspan="2">
-                                       <code><?php echo htmlspecialchars($user->ip); ?></code>
+                                       <code><?php echo (isset($user->ip) ? htmlspecialchars($user->ip) : "255.255.255.255"); ?></code>
                                <?php
                                if (strlen($cc))
                                {
index 05f1a63c7bc34b21df77871a013769b771198065..8e4dbbc2b9dbbf9b3ab89452981bc214b4d06b98 100644 (file)
@@ -106,7 +106,7 @@ do_log("\$_FILES", $_FILES);
 <div class="card m-1" style="padding-left:20px;padding-right:20px;padding-top:5px;padding-bottom:10px;max-width:fit-content">
     <h6>Debug Mode</h6>
     <div class="custom-control custom-switch">
-        <input name="debug_mode" type="checkbox" class="custom-control-input" id="debug_mode" <?php _ce($canEdit); echo ($config['debug'] == true) ? " checked" : ""; ?>>
+        <input name="debug_mode" type="checkbox" class="custom-control-input" id="debug_mode" <?php _ce($canEdit); echo (get_config('debug') == true) ? " checked" : ""; ?>>
         <label class="custom-control-label" for="debug_mode">Enable Debug Mode (Developers Only)</label>
     </div>
     <i>Enabling this will likely make your webpanel more difficult to use</i>