If an onfield umpire is ill or injured in an international match, then he is replaced by the third umpire. The duties of the third umpire are then performed by the fourth umpire.
An example of this was 1st ODI: India v Australia at Vadodara where the planned umpire Mark Benson fell ill shortly before the match, and was replaced by the planned 3rd Umpire, Amish Saheba.
As a side note: the link you gave was to the unfortunate case of the umpire dying on the pitch. Here, extra considerations to the feelings of players, coaches, officials and the public would have to be made. I assume the match was abandoned for these reasons, and that it would almost always be possible to find a suitable replacement to act as a square-leg umpire for a local match.
The Fourth Umpire/Reserve Umpire is on stand-by in case the on-field umpires or the third umpire are not in a position to perform their duties due to various reasons.