I have to agree with Marianna. The problems with Brian Wilde were vast in the first "Foggy Run." He criticized both the directing and the writing, but Brian Wilde wasn't fired, he made the decision to leave. He had said he would not do another season after the film "Getting Sam Home" so they wrote an ending having him disappearing over the edge (I think secretly hoping he would not do another season). But he chose to do one more season and then left.
When he left the second time, his complaints were different. He was having difficulty keeping up with the physical rigors of the filming, asking to do less and less all the time and even asked for his role be downgraded. When he developed Shingles, he was unable to come back for filming at the start of the 19th season.
The part had originally been written for Foggy and in one interview Frank Thornton said he was hired to fill in for just a few episodes, but between the shingles and scheduling difficulties, he ended up doing the whole series. They had Foggy's part in "There Goes the Groom" open ended so he could return later, but according to what Wilde said in an interview, he chose not to go back. I think he would have liked to if the role hadn't been so physically demanding, but he just couldn't handle it anymore. I'm sure there were many who were glad with the outcome, as Brian Wilde hadn't been easy to work with in either of his runs. But from everything I've read and heard on interviews, he was not fired but chose to leave both times.