Skip to content
Advertisement

Passing the encoding as third parameter is deprecated. Use an explicit zero offset

I just switched to the server from the localhost. It was working all fine until a few minutes ago. When I load the front page, this is the error It keeps showing up.

mb_strrpos(): Passing the encoding as the third parameter is deprecated. Use an explicit zero offset (View:some-blade.blade.php)

Any idea what this error is trying to imply?

Error point directed

JavaScript

In line 138,139,140:

JavaScript

Advertisement

Answer

You’re using PHP 7.4, which has changed the number of arguments in mb_strrpos(). You need to pass the encoding as the 4th parameter now.

See Migration Guide for 7.4

Passing the encoding as 3rd parameter to mb_strrpos() is deprecated. Instead pass a 0 offset, and encoding as 4th parameter.


Sidenote: It looks like this was not added to the changelog of the mb_strrpos documentation. So I have updated the changelog list in the documentation here.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement