The line of code looks fine to me. If you detach the page from the template, then make modifications so line 186 looks like this instead:
if ((strpos($WA_curURL,strtolower($WA_localRoot)) !== false &&
strpos($WA_curURL,strtolower($WA_localRoot)) == 0) &&
(strlen($WA_localRoot) >= strlen($WA_remoteRoot) ||
strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
Then the line number the error points at will let us know which strpos call is causing the error.