General Error utf8_strpos: Offset must be an integer

current version: 1.0.6
released: 02.02.2012

General Error utf8_strpos: Offset must be an integer

Postby zappa » Wed Aug 24, 2011 7:05 pm

I get that error if I leave the default 500 character. I have to set it to 9000 to bypass that error.

The forum where it gets the news from is from a post where there are pictures, youtube videos and links. It happens even if there is text only.

I'm not sure if that is a conflict or a bug. I would appreciate you could help me figure that out as i don't have enough phpbb knowledge to fix it my self.


I'm running phpbb 3.09 if that helps.


Thanks
zappa
Posts < 10
Posts < 10
 
Posts: 6
Topics: 1
Joined: Wed Aug 24, 2011 5:57 pm

Re: General Error utf8_strpos: Offset must be an integer

Postby nickvergessen » Thu Aug 25, 2011 10:11 am

Was the error message a bit longer and stated a line of the file or something?
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: General Error utf8_strpos: Offset must be an integer

Postby zappa » Thu Aug 25, 2011 11:12 pm

Thanks for following this up with me.

Nope it's general error.

I uploaded a screenshot here for reference:

http://i51.tinypic.com/2ppdbfl.jpg

It only happens if you are logged in. what do you think?
zappa
Posts < 10
Posts < 10
 
Posts: 6
Topics: 1
Joined: Wed Aug 24, 2011 5:57 pm

Re: General Error utf8_strpos: Offset must be an integer

Postby nickvergessen » Fri Aug 26, 2011 12:06 am

Please try viewtopic.php?f=27&t=1806
And please post your post text from the news forum here, if that is possible
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: General Error utf8_strpos: Offset must be an integer

Postby zappa » Fri Aug 26, 2011 5:43 am

Hi

I keep the debug mode on all the time. so the error didn't change.

I'm using this forum here as a test News .

right now the mod in ACP is set to 300 characters.
zappa
Posts < 10
Posts < 10
 
Posts: 6
Topics: 1
Joined: Wed Aug 24, 2011 5:57 pm

Re: General Error utf8_strpos: Offset must be an integer

Postby nickvergessen » Fri Aug 26, 2011 11:05 am

Can you please try to replace your includes/trim_message/bbcode.php with the attached file?
Attachments
bbcodes.zip
(3.33 KiB) Downloaded 185 times
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: General Error utf8_strpos: Offset must be an integer

Postby zappa » Sat Aug 27, 2011 1:55 am

thx. just tried. still the same error. what do we do next?
zappa
Posts < 10
Posts < 10
 
Posts: 6
Topics: 1
Joined: Wed Aug 24, 2011 5:57 pm

Re: General Error utf8_strpos: Offset must be an integer

Postby nickvergessen » Sat Aug 27, 2011 11:17 am

Okay, so if that does not help, could you please edit your includes/utf/utf_tools.php
find:
Code: Select all
            trigger_error('utf8_strpos:  Offset must  be an integer', E_USER_ERROR);
            return false;
         }

and before that add:
Code: Select all
            var_dump($str);
            var_dump($needle);
            var_dump($offset);
            trigger_error($str . '#$#' . $needle . '#$#' . $offset);


so that the code block looks like:
Code: Select all
         if (!is_int($offset))
         {
            var_dump($str);
            var_dump($needle);
            var_dump($offset);
            trigger_error($str . '#$#' . $needle . '#$#' . $offset);
            trigger_error('utf8_strpos:  Offset must  be an integer', E_USER_ERROR);
            return false;
         }
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: General Error utf8_strpos: Offset must be an integer

Postby zappa » Sat Aug 27, 2011 6:34 pm

Hi Nick,

That didn't go too well either.

check this out: http://i52.tinypic.com/osg39l.jpg
zappa
Posts < 10
Posts < 10
 
Posts: 6
Topics: 1
Joined: Wed Aug 24, 2011 5:57 pm

Re: General Error utf8_strpos: Offset must be an integer

Postby nickvergessen » Sun Aug 28, 2011 12:42 am

Well it did exactly what I wanted to achieve ;)

Okay, can you please try this fix:
https://github.com/nickvergessen/phpbb3 ... 4b12cfb27b

So open:
includes/trim_message/bbcodes.php
find:
Code: Select all
      $last_html_opening = $last_html_closing = $last_smiley = false;

replace with:
Code: Select all
      $last_smiley = false;
      $last_html_opening = $last_html_closing = 0;
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Next

Return to NV Newspage

Who is online

Users browsing this forum: No registered users and 1 guest