It therefore seems that the doubt comes from Ibn al-Mubārak himself, and that the correct wording is the version transmitted by ʿAmr ibn Rāfiʿ from him that says “forty,” with no uncertainty—especially since the same wording will appear shortly through another route.
As for this particular chain of transmission, its narrators are all trustworthy except for Jarīr ibn Yazīd al-Bajalī, who is weak, as stated in al-Taqrīb. Still, he was not the sole transmitter, for Ibn Ḥibbān recorded the ḥadīth in his Ṣaḥīḥ (1507) via Yūnus ibn ʿUbayd, from ʿAmr ibn Saʿīd, from Abū Zurʿah, with the wording: “The enforcement of a fixed legal penalty in a land is better for its people than rain for forty mornings.” This chain is authentic; every narrator in it is trustworthy.
I then took a second look and said: the report is actually defective, for Ibn Ḥibbān’s isnād runs as follows: Ibn Qutaybah informed us, Muḥammad ibn Qudāmah related to us, Ibn ʿUlayyah related to us, from Yūnus ibn ʿUbayd … Abū Isḥāq al-Muzakkī likewise cited it in al-Fawāʾid al-Muntakhabah (1/114/1) through another route from Ibn Qudāmah, commenting: “Muḥammad ibn Qudāmah alone transmitted it.”
Although this isnād appears sound and all its narrators are deemed trustworthy—including Muḥammad ibn Qudāmah, the son of Ayman al-Miṣṣīṣī, about whom al-Nasāʾī said, “There is nothing wrong with him,” and on another occasion, “He is acceptable,” while al-Dāraqutnī graded him “trustworthy,” and Maslamah ibn Qāsim said: