What does "strpos() expects parameter 3 to be integer, string given" mean?

The strpos() function accepts two or three parameters, the third one being optional.

  1. is “haystack”, the thing to search in.
  2. is “needle”, the thing to find.
  3. is an offset, where to start searching, it must be an integer.

You have the string “onepage” as parameter 3.