fix #2012 & revised r13072 (partly fix #1805 - replaced function strstr() with strpos() where possible) - fix strpos usage