Answer:
Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
We do not know whether
Imam Ibn Hazam gave the ruling you are asking about or not.
However, all the Muslim scholars have agreed upon the sphericity of the earth. [
Sheikh ul-Islam Ibn Taymiyah ] said:
'All the Muslim scholars have agreed upon that earth and orbits are of the spherical shape. All the astronomists are also agreed upon this fact.' Allah know best