1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

strpos...

git-svn-id: file:///svn/phpbb/trunk@6457 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-10-07 16:49:44 +00:00
parent eac1b02843
commit c40783e6a2
3 changed files with 8 additions and 13 deletions

View File

@@ -445,7 +445,7 @@ class bbcode_firstpass extends bbcode
$code = preg_replace('#(?:[\n\r\s\t]|&nbsp;)*</span>$#', '</span>', $code);
// remove newline at the end
if (!empty($code) && $code{utf8_strlen($code)-1} == "\n")
if (!empty($code) && $code{strlen($code)-1} == "\n")
{
$code = substr($code, 0, -1);
}
@@ -499,14 +499,15 @@ class bbcode_firstpass extends bbcode
$tok = ']';
$out = '[';
// First character is [
$in = substr($in, 1);
$list_end_tags = array();
do
{
$pos = strlen($in);
$tok_len = strlen($tok);
for ($i = 0; $i < $tok_len; ++$i)
for ($i = 0, $tok_len = strlen($tok); $i < $tok_len; ++$i)
{
$tmp_pos = strpos($in, $tok{$i});