TypeError thrown

mb_strrpos(): Argument #3 ($offset) must be of type int, string given