prevent substr_compare() notices