Page 1 of 1

utf8_strpos: Offset must be an integer

Posted: 7. July 2011 00:49
by yoper
Hello,

I'm not sure what I did, the portal was working just fine but now when I access to the portal I get this error:

General Error
utf8_strpos: Offset must be an integer

What can cause this error?

Also another question, what is the use of board3_menu"_1"? can't it just be board3_menu?


Edit:I changed this line in includes/utf/utf_tools.php so I can get errors

trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR);

to

trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR);

here is what I get:
[phpBB Debug] PHP Notice: in file /includes/utf/utf_tools.php on line 310: Invalid error type specified
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4319: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3494)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4321: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3494)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4322: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3494)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4323: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3494)

Re: utf8_strpos: Offset must be an integer

Posted: 9. July 2011 16:26
by Marc
That error appears because you changed that line.

We are already aware of the mentioned bug and we are currently working on it.

Re: utf8_strpos: Offset must be an integer

Posted: 9. July 2011 19:09
by yoper
Thanks for your answer Marc, I will be waiting for the fix.

Thanks for the great work. ;)

Re: utf8_strpos: Offset must be an integer

Posted: 14. July 2011 01:48
by yoper
Hello,

I tried to move up "Link to us" but it stuck and can't pass "Top Posters"
Also are you close from finding "utf8_strpos: Offset must be an integer" error?

Regards.

Re: utf8_strpos: Offset must be an integer

Posted: 26. July 2011 01:36
by yoper
Update

This will help you fixing the problem:
When I removed the Latest news module also Global announcements can cause that, the error doesn't show anymore ;) (Offset must be an integer)

Re: utf8_strpos: Offset must be an integer

Posted: 12. August 2011 09:22
by stesmi
Hi all.

I know, first post and all.

I put in a debug_print_backtrace() into utf8_strpos where they print the failure message and found that utf8_strpos is being called with an empty last argument (or well, it's "false" so it doesn't print as anything).

That comes from the following line in bbcodes.php:317

while (($last_html_opening = utf8_strpos($content, '<', $last_html_closing)) !== false)

The line before that is :

$last_html_opening = $last_html_closing = $last_smiley = false;

Making $last_html_closing FALSE. and FALSE isn't a number.

I changed the = false to = 0 and voilá, it works.

I don't know if it's a proper fix or so but it seems to make it work here.

So line 316, change = false to = 0 until the devs tell us otherwise I guess?

// Stefan

Re: utf8_strpos: Offset must be an integer

Posted: 1. October 2011 00:27
by giardiniere
Any news?

Re: utf8_strpos: Offset must be an integer

Posted: 1. October 2011 09:20
by stesmi
My fix not working for you ?

// Stefan

Re: utf8_strpos: Offset must be an integer

Posted: 1. October 2011 12:27
by giardiniere
I have not tried it because I have to decide to install 2.0 version and I wanted to know if this bug is officially fixed :oops:
Thank you for your help :) but I'd like to know if your solution is "the solution" for Marc too ;-)

Re: utf8_strpos: Offset must be an integer

Posted: 16. December 2011 00:08
by George
yoper wrote:Update

This will help you fixing the problem:
When I removed the Latest news module also Global announcements can cause that, the error doesn't show anymore ;) (Offset must be an integer)
Hey guys, I'm also having this issue.

I removed those two modules and now receive a blank page on the portal. When I put the modules back, I receive the same blank page.
stesmi wrote:Hi all.

I know, first post and all.

I put in a debug_print_backtrace() into utf8_strpos where they print the failure message and found that utf8_strpos is being called with an empty last argument (or well, it's "false" so it doesn't print as anything).

That comes from the following line in bbcodes.php:317

while (($last_html_opening = utf8_strpos($content, '<', $last_html_closing)) !== false)

The line before that is :

$last_html_opening = $last_html_closing = $last_smiley = false;

Making $last_html_closing FALSE. and FALSE isn't a number.

I changed the = false to = 0 and voilá, it works.

I don't know if it's a proper fix or so but it seems to make it work here.

So line 316, change = false to = 0 until the devs tell us otherwise I guess?

// Stefan
I tried this, but I wasn't able to find the line of code.


Any help is appreciated, I really want this MOD to work.