浏览代码

warning fix

jmunro 23 年之前
父节点
当前提交
58a28b1b6b
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/options_highlight.php

+ 6 - 1
src/options_highlight.php

@@ -298,7 +298,12 @@ if ($action == 'edit' || $action == 'add') {
     # Show grid of color choices
     # Show grid of color choices
     echo "<tr bgcolor=\"$color[0]\"><td colspan='2'>\n";
     echo "<tr bgcolor=\"$color[0]\"><td colspan='2'>\n";
     echo "<table border=0 cellpadding=\"2\" align=\"center\" cellspacing=\"1\">\n";
     echo "<table border=0 cellpadding=\"2\" align=\"center\" cellspacing=\"1\">\n";
-    $current_color = $message_highlight_list[$theid]['color'];
+    if (isset($message_highlight_list[$theid]['color'])) {
+        $current_color = $message_highlight_list[$theid]['color'];
+    }
+    else {
+        $current_color = '63aa7f';
+    }
     for($x = 0; $x < 5; $x++) {
     for($x = 0; $x < 5; $x++) {
         echo "<tr>\n";
         echo "<tr>\n";
         for($y = 0; $y < 19; $y++) {
         for($y = 0; $y < 19; $y++) {