Sfoglia il codice sorgente

! another bad micro optimization which allowed the array index to walk off the end if the last item in a message was a bbc tag, resulting in error log spam.

Spuds 13 anni fa
parent
commit
24030d58b5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Sources/Subs.php

+ 1 - 1
Sources/Subs.php

@@ -1944,7 +1944,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 			if (stripos($message, $possible['tag'], $pos + 1) !== $pos + 1)
 				continue;
 
-			$next_c = $message[$pos + 1 + strlen($possible['tag'])];
+			$next_c = substr($message, $pos + 1 + strlen($possible['tag']), 1);
 
 			// A test validation?
 			if (isset($possible['test']) && preg_match('~^' . $possible['test'] . '~', substr($message, $pos + 1 + strlen($possible['tag']) + 1)) == 0)