瀏覽代碼

This fix is for the problem Matthew Hagerty reported. (PHP appearing to execute code he had in an email message. It wasn't actually executing, but it WAS barfing.)
I didn't hear back from Mr. Hagerty, so I'll assume the fix worked for him.
(It worked for me)

tassium 22 年之前
父節點
當前提交
b5d93d0cc1
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. 9 5
      plugins/squirrelspell/modules/check_me.mod

+ 9 - 5
plugins/squirrelspell/modules/check_me.mod

@@ -191,12 +191,16 @@ for ($i=0; $i<sizeof($sqspell_output); $i++){
      */
     if (!$SQSPELL_EREG("\n$sqspell_word\n", $words)){
       $sqspell_symb=intval($tmparray[2])-1;
-      if (!$misses[$sqspell_word]) {
-	$misses[$sqspell_word] = '_NONE';
-	$missed_words[$errors] = $sqspell_word;
-	$errors++;
+      if (!isset($misses[$sqspell_word])) {
+	    $misses[$sqspell_word] = '_NONE';
+	    $missed_words[$errors] = $sqspell_word;
+	    $errors++;
       }
-      if ($locations[$sqspell_word]) $locations[$sqspell_word] .= ', ';
+      if (isset($locations[$sqspell_word])) {
+	    $locations[$sqspell_word] .= ', ';
+      } else {
+	    $locations[$sqspell_word] = '';
+	  }
       $locations[$sqspell_word] .= "$current_line:$sqspell_symb";
     }
   break;