fix spelling mistake substr to str_replace