Pope Leo XIII was a philanderer. I sugest what he said was null and void too.
Without trying to defend or accuse Leo XIII of anything let me add something that I find to be rather important:
Men have often said things that were good or important. I am convinced that not all that I have ever said was null and void and I am also convinced that I sometimes say something that might be of value. Without trying to elevate myself, I think I can safely assume that not all of my words are of a vile nature.
I am however a sinful person and I could and would never even think about beginning to deny that. My sin is great indeed and without the grace of my Lord I would be eternally lost and condemned. Parts of me are so vile and some of the thoughts that I have had in the past are so filthy, that I would not show them to my best friends. If I did they would not be my best friends any longer.
I am a sinful person and I cannot deny that. Denial would call God a liar.
Does my sin make everything I say null and void? No it doesn’t.
In the same sense I consider it a fallacy to assume that a former pope’s lifestyle, be it fact or fiction, makes his testimony null and void.
Whether or not I agree with what he said is a completely different issue. We cannot however deduct the validity of what he said from what he might have done, be it proven or not.