From 3b772bb5ff3d3a2027d0c5bc2995d08f9ca09b0f Mon Sep 17 00:00:00 2001 From: Floorb <132411956+Neetpone@users.noreply.github.com> Date: Sat, 24 Jul 2021 14:48:10 -0400 Subject: [PATCH] Fix geshi warning --- includes/geshi.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/geshi.php b/includes/geshi.php index 2ee5149..39c4ff0 100644 --- a/includes/geshi.php +++ b/includes/geshi.php @@ -2959,6 +2959,7 @@ class GeSHi { $next_comment_single_pos = $length; foreach ($this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark) { $match_i = false; + $case_sensitive_comments = (bool) @$this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS]; if (isset($comment_single_cache_per_key[$comment_key]) && ($comment_single_cache_per_key[$comment_key] >= $i || $comment_single_cache_per_key[$comment_key] === false)) { @@ -2970,10 +2971,10 @@ class GeSHi { $match_i = $comment_single_cache_per_key[$comment_key]; } elseif ( // case sensitive comments - ($this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && + ($case_sensitive_comments && ($match_i = stripos($part, $comment_mark, $i)) !== false) || // non case sensitive - (!$this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && + (!$case_sensitive_comments && (($match_i = strpos($part, $comment_mark, $i)) !== false))) { $comment_single_cache_per_key[$comment_key] = $match_i; } else {