Skip to content

Commit

Permalink
Empty check for e_tohtml_linkwords::linksproc()
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Jan 18, 2020
1 parent a1560b1 commit 9506f98
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions e107_plugins/linkwords/e_tohtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,11 @@ function linksproc($text,$first,$limit)
$tp = e107::getParser();
$doSamePage = !e107::getPref('lw_notsamepage');

// Consider next line - stripos is PHP5, and mb_stripos is PHP >= 5.2 - so may well often require handling
// while (($first < $limit) && (stripos($text,$this->word_list[$first]) === FALSE)) { $first++; }; // *utf (stripos is PHP5 - compatibility handler implements)



while (($first < $limit) && (strpos($tp->ustrtolower($text),$this->word_list[$first]) === false))
for (; $first < $limit; $first ++)
{
$first++;
} // *utf
if (empty($this->word_list[$first])) continue;
if (strpos($tp->ustrtolower($text), $this->word_list[$first]) !== false) break;
}

if ($first == $limit)
{
Expand Down

0 comments on commit 9506f98

Please sign in to comment.