I am not sure you can actually define Fisher's Exact test when you have a zero row/column.
There are two ways you can look at this, although none of the references for Fisher's exact test define a p-value when there is a row/col total that is 0.
First, you can treat as the null distribution. The problem is that in a 2x2 case you are essentially working under the assumption of 2 independent binomials. This requires p>0. The distribution would not be defined when either (or both) p1=0 or p2=0.
Even if you ignore this and attempted to define it, you would be dealing with a degenerative case which is not very useful. The test is computed by conditioning on the (observed) marginal totals of the contingency table. For a 2x2 table, if one row or column has a total frequency of zero, then the observed table is the only table that can be constructed with the observed marginals. This would be a degenerate hypergeometric distribution, which can take only a single value. Because there’s only one possible table, then the probability of this table would equal 1 in the fixed-margin framework. So you could define the p-value as 1, but that is not very useful and would be contrary to the generally accepted approach in the literature.
... View more