backdrop-contrib / devel

Provides helper functions for Backdrop developers.
https://backdropcms.org/project/devel
GNU General Public License v2.0
10 stars 13 forks source link

Warning: mt_rand(): max(0) is smaller than min(1) if max comments is set to 0 #123

Closed klonos closed 2 years ago

klonos commented 3 years ago

When generating nodes with the "Maximum number of comments per node." setting set to 0, I receive this warning multiple times:

Warning: mt_rand(): max(0) is smaller than min(1) in devel_generate_add_comments()
(line 155 of /app/docroot/modules/devel/devel_generate/devel_generate.inc).
klonos commented 3 years ago

@alanmels or @quicksketch can you please review/merge this simple fix? Thanks.

bugfolder commented 3 years ago

Tested on a local site: works as advertised. LGTM.