Hide PHP Warning: substr_compare() The length cannot exceed initial string length