fix for errorcode for older php version